Untitled
Anonymous
plain_text
04/27/2023 1:36 PM
716 B
16
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...