Optionaloptions: SharedStateOptions<T>ReadonlyreadyReadonlysetRemove the value of the shared state. Actually this just sets the value back to the given default value.
Get a value directly from the store. Returns undefined if there is no backing store.
Get the value of the shared state.
getSnapshot function — must return same ref if value unchanged.
Note that this would return the default value if data init from store is
not completed yet.
Returns true if there is a backing store.
Initial default handling.
Set a value directly into the store. Does nothing if there is no backing store.
Warning: If you want to set the value properly, you should use
setValue() instead which also updates the in-memory copy.
subscribe function required by useSyncExternalStore.
Please use sharedState() instead.