P
const store = createStore()
const ev = createEvent()
withRegion(ev, () => {
store.watch(() => {})
})
clearNode(ev)
watch будет уничтожен?
Size: a a a
P
const store = createStore()
const ev = createEvent()
withRegion(ev, () => {
store.watch(() => {})
})
clearNode(ev)
AO
AO
P
AO
AO
AO
P
AO
AO
AO
P
AO
AO
R
AO
AO
AO
P
export function listen<T>(channel: string, event: string): Event<T> {
const messages = echo.createEvent<T>();
withRegion(messages, () => {
$socket.watch(socket => {
if (socket) {
socket.on(event, (gotChannel: string, payload: any) => {
if (gotChannel === channel) {
messages(payload);
}
});
}
});
});
return messages;
}