UseSuspenseAtomicProp<R extends string, S extends Record<R, any>>

type
react/src/hooks/suspense.ts:707

Call 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

NameTypeDescription
Rextends stringReducer name union.
Sextends Record<R, any>State record keyed by R.