Skip to content

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:

TConfig

The type of the config

TPayload

The type of the value passed into the update function that the reducer must apply to the config

TConfig

The entire config

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

TConfig

The entire modified config