UseAtomicProp<R extends string, S extends Record<R, any>>
typeCall signature for the typed useAtomicProp hook returned by createHooks.
Subscribes to a specific dotted path in a reducer's state and re-renders
only when that path changes. All type parameters are inferred automatically
from the store context — no explicit generics needed.
Definition
type
type UseAtomicProp<R extends string, S extends Record<R, any>> = (reducer: R1, accessor: (state: DeepReadonly<S[R1]>) => V, isEqual?: (a: V, b: V) => boolean) => V(reducer: R1, accessor: (state: DeepReadonly<S[R1]>) => V, isEqual?: (a: V, b: V) => boolean) => V
Type parameters
| Name | Type | Description |
|---|---|---|
R | extends string | Reducer name union. |
S | extends Record<R, any> | State record keyed by R. |