Interface: StoreHooks<S>
A store bound to a name and a shape: typed hooks with no per-call generics.
Type Parameters
| Type Parameter |
|---|
S extends Record<string, unknown> |
Properties
get
get: () => AnyStore;
The underlying store instance (the same one the hooks use) — for non-React code.
Returns
useSharedState
useSharedState: <K>(key, initial) => [S[K], (next) => void];
Type Parameters
| Type Parameter |
|---|
K extends string |
Parameters
| Parameter | Type |
|---|---|
key | K |
initial | S[K] |
Returns
[S[K], (next) => void]