Untitled
unknown
plain_text
3 years ago
537 B
8
Indexable
let {dataTable} = store.virtualStore;
useEffect(() => {
if (!subscribe) {
sse.subscribe('session', (data: string) => {
const sessionEvent = JSON.parse(data);
if (sessionEvent) {
dataTable = store.virtualStore.map(item => {
if (sessionEvent.sourceId === item.id) {
item.play = sessionEvent.state === 'started';
}
return item;
});
}
});
}
}, []);Editor is loading...