MCPcopy Create free account
hub / github.com/alibaba/hooks / syncStateFromCustomEvent

Function syncStateFromCustomEvent

packages/hooks/src/createUseStorageState/index.ts:145–147  ·  view source on GitHub ↗
(event: CustomEvent<StorageEvent>)

Source from the content-addressed store, hash-verified

143 };
144
145 const syncStateFromCustomEvent = (event: CustomEvent<StorageEvent>) => {
146 syncState(event.detail);
147 };
148
149 // from another document
150 useEventListener('storage', syncState, {

Callers

nothing calls this directly

Calls 1

syncStateFunction · 0.85

Tested by

no test coverage detected