UseAtomicProps<R extends string, S extends Record<R, any>>
typeCall signature for the typed useAtomicProps hook returned by createHooks.
Subscribes to multiple dotted paths across one or more reducers and recomputes
a derived value when any of them change.
Definition
type
type UseAtomicProps<R extends string, S extends Record<R, any>> = (specs: { property: WithGlob<Dotted<S[R1]>> | readonly WithGlob<Dotted<S[R1]>>[]; reducer: R1 }[], selector: (state: DeepReadonly<S>) => T, isEqual?: (a: T, b: T) => boolean) => T(specs: { property: WithGlob<Dotted<S[R1]>> | readonly WithGlob<Dotted<S[R1]>>[]; reducer: R1 }[], selector: (state: DeepReadonly<S>) => T, isEqual?: (a: T, b: T) => boolean) => T
Type parameters
| Name | Type | Description |
|---|---|---|
R | extends string | Reducer name union. |
S | extends Record<R, any> | State record keyed by R. |