Minimal observable store backing every framework binding.
The shape is intentionally tiny:
subscribe(listener) → unsubscribe lines up with React's
useSyncExternalStore.getSnapshot() returns a referentially-stable value for
unchanged state so React can bail out of renders.subscribe + getSnapshot in
their own reactivity primitive (shallowRef / writable /
signal) in ~10 lines.Snapshot identity matters: a listener is only useful if
getSnapshot() returns a different reference when state changes.
Callers MUST pass a freshly-constructed value to setState;
mutating the previous snapshot in place will break React's bail-out
and cause infinite re-renders.
StoreListener: () => void