Skip to content

makeStateUpdater

ts
function makeStateUpdater<TFeatures, K>(key, instance): (updater) => void;

Defined in: utils.ts:97

Creates a table state updater for a single state slice.

The updater writes through the table base atom for the slice and supports both value and functional updater forms.

Type Parameters

TFeatures

TFeatures extends TableFeatures

K

K extends string | number | symbol | string & object

Parameters

key

K

instance

baseAtoms

object

options

{ atoms?: object; }

options.atoms?

object

Returns

(updater) => void