UseSuspenseAtomicProp<R extends string, S extends Record<R, any>>
typeCall signature for the typed useSuspenseAtomicProp returned by createHooks.
Identical in behaviour to the package-level useSuspenseAtomicProp; the reducer union
and state shape are fixed by the store the hooks were created for, so neither has to be
supplied at the call site.
Definition
type
type UseSuspenseAtomicProp<R extends string, S extends Record<R, any>> = (storeSpec: { property: P; reducer: R1 }, options: SuspenseAtomicPropOptions<T, S>) => T(storeSpec: { property: P; reducer: R1 }, options: SuspenseAtomicPropOptions<T, S>) => T
Type parameters
| Name | Type | Description |
|---|---|---|
R | extends string | Reducer name union. |
S | extends Record<R, any> | State record keyed by R. |