The store type; must expose a subscribe(listener) method.
The snapshot value type.
Pass the store instance and a selector that reads the snapshot off it (s => s.getSelection()).
subscribe is memoized on the store identity so it stays a stable reference across renders (a
changed subscribe would resubscribe); the snapshot selector may be an inline arrow. The selector
doubles as the SSR snapshot.
Contrast useOptionalSyncExternalStore, which takes pre-bound standalone functions and
tolerates an absent (null) store.
Like useSyncExternalStore, but for a store exposed as an object with methods rather than standalone functions. It calls
store.subscribe(...)and the snapshot selector on the instance, so a normalthis-centric class — whose methods are NOT pre-bound — works without the caller detaching its methods (which would stripthis). The model stays a plain class; the one adaptation intouseSyncExternalStore's function-value contract lives here.