Skip to content

createHooks

createHooks<TConfig>(): object

Defined in: packages/react/src/hooks.ts:188

Creates a set of typed hooks bound to your specific Config type. Use this to avoid passing the generic type <MyConfig> to every hook usage.

TConfig

The type of the configuration.

object

useConfig: <TSelected>(selector?) => TSelected

TSelected = TConfig

(config, state) => TSelected

TSelected

useUpdateConfig: () => UseUpdateConfigResult<TConfig>

UseUpdateConfigResult<TConfig>

useUpdateConfigReducer: <TPayload>(reducer) => UseUpdateConfigReducerResult<TConfig, TPayload>

TPayload

ConfigReducer<TConfig, TPayload>

UseUpdateConfigReducerResult<TConfig, TPayload>