When you want to use a unqiue instance of a global Store but do not need a Context API.
Simply pass in a store to the useStore hook and recieve a memoized version of it - protected against re-renders.
For more information about stores, see the Stores page.
useStore accepts the following options:
| Params | Required | Description |
|---|---|---|
store | Yes | The store function reference to call. |
useStore returns a memoized version of the store value (e.g., what the store returns);
Count: 0
Render Count: 1