-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
- The documentation and descriptions currently use unintuitive names. I'm changing dispatch to setStore to avoid confusion with the dispatch logic in useReducer; listen to subscribe, unlisten to unsubscribe to make it clear they're waiting for an action and not enabling interactivity; and the callback argument to onStoreChange, similar to one in useSyncExternalStore.
- The enabled option in listen is removed - it adds too much logic, while it is easy for the user to repeat it manually (just write the condition inside onStoreChange)
- Improved logic for launching useStore, comparing stores, and analyzing status
All these changes, with the exception of removing enabled from listen, are internal and should not affect existing projects in any way.
Metadata
Metadata
Assignees
Labels
No labels