useStore
UseStore is a React hook used by several state-management libraries to access a centralized store from within a component. The most widely known implementation is Zustand’s useStore, but the approach is used by other libraries under similar names. The hook enables components to read state and subscribe to changes without prop drilling, and to invoke mutators or actions defined on the store.
In libraries like Zustand, a store is created by a factory function that defines the initial state
The pattern supports partial subscriptions and derived data, improving performance in large applications. State updates can
Limitations include tight coupling to a specific store instance and the need to ensure updates remain predictable