Rxova
Skip to content

StoreHooks

A store bound to a name and a shape: typed hooks with no per-call generics.

Type Parameter
S extends Record<string, unknown>
get: () => AnyStore;

The underlying store instance (the same one the hooks use) — for non-React code.

AnyStore


useSharedState: <K>(key, initial) => [S[K], (next) => void];
Type Parameter
K extends string
ParameterType
keyK
initialS[K]

[S[K], (next) => void]