apiref
sync-external-store@1.0.0

SyncExternalStore.subscribe  Property

The subscribe function to pass as the 1st argument to useSyncExternalStore.

Signature

subscribe: (onStoreChange: (value: T) => void) => () => void;