Skip to main content

Function: updateState()

updateState<State>(stateSource, action, ...updaters): void

Defined in: lib/devtools/update-state.ts:38

Wrapper of patchState for DevTools integration. Next to updating the state, it also sends the action to the DevTools.

Type Parameters​

State​

State extends object

Parameters​

stateSource​

WritableStateSource<State>

state of Signal Store

action​

string | Action

name of action how it will show in DevTools

updaters​

...(Partial<NoInfer<State>> | PartialStateUpdater<NoInfer<State>>)[]

updater functions or objects

Returns​

void