ConfigReducer
ConfigReducer<
TConfig,TPayload> = (config,payload,state) =>TConfig
Defined in: packages/react/src/types.ts:70
A reducer that applies a given payload to the current config.
Passed into useUpdateConfigReducer() to produce a simplified update function
that only requires the payload.
Example:
Type Parameters
Section titled “Type Parameters”TConfig
Section titled “TConfig”TConfig
The type of the config
TPayload
Section titled “TPayload”TPayload
The type of the value passed into the update function that the reducer must apply to the config
Parameters
Section titled “Parameters”config
Section titled “config”TConfig
The entire config
payload
Section titled “payload”TPayload
The value passed into the update function that the reducer must apply to the config
ManagerState<TConfig>
The state of ConfigManager, typically not needed
Returns
Section titled “Returns”TConfig
The entire modified config