MCPcopy Create free account
hub / github.com/electric-sql/electric / handleStorageChange

Function handleStorageChange

examples/linearlite/src/sync.ts:271–276  ·  view source on GitHub ↗
(e: StorageEvent)

Source from the content-addressed store, hash-verified

269
270 useEffect(() => {
271 const handleStorageChange = (e: StorageEvent) => {
272 if (e.key === `syncStatus` && e.newValue) {
273 const [newStatus, message] = JSON.parse(e.newValue)
274 setSyncStatus([newStatus, message])
275 }
276 }
277
278 window.addEventListener(`storage`, handleStorageChange)
279

Callers

nothing calls this directly

Calls 2

resolveFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected