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.
Type Parameters
Section titled “Type Parameters”TConfig
Section titled “TConfig”TConfig
The type of the configuration.
Returns
Section titled “Returns”object
useConfig()
Section titled “useConfig()”useConfig: <
TSelected>(selector?) =>TSelected
Type Parameters
Section titled “Type Parameters”TSelected
Section titled “TSelected”TSelected = TConfig
Parameters
Section titled “Parameters”selector?
Section titled “selector?”(config, state) => TSelected
Returns
Section titled “Returns”TSelected
useUpdateConfig()
Section titled “useUpdateConfig()”useUpdateConfig: () =>
UseUpdateConfigResult<TConfig>
Returns
Section titled “Returns”UseUpdateConfigResult<TConfig>
useUpdateConfigReducer()
Section titled “useUpdateConfigReducer()”useUpdateConfigReducer: <
TPayload>(reducer) =>UseUpdateConfigReducerResult<TConfig,TPayload>
Type Parameters
Section titled “Type Parameters”TPayload
Section titled “TPayload”TPayload
Parameters
Section titled “Parameters”reducer
Section titled “reducer”ConfigReducer<TConfig, TPayload>
Returns
Section titled “Returns”UseUpdateConfigReducerResult<TConfig, TPayload>