MCPcopy
hub / github.com/statelyai/xstate / set

Method set

packages/xstate-store/src/types.ts:635–635  ·  view source on GitHub ↗

Sets the value of the atom using a function.

(fn: (prevVal: T) => T)

Source from the content-addressed store, hash-verified

633export interface Atom<T> extends BaseAtom<T> {
634 /** Sets the value of the atom using a function. */
635 set(fn: (prevVal: T) => T): void;
636 /** Sets the value of the atom. */
637 set(value: T): void;
638}

Callers 15

CounterFunction · 0.65
TestComponentFunction · 0.65
ComponentFunction · 0.65
atom.test.tsFile · 0.65
constructorMethod · 0.65
receiveFunction · 0.65
onFunction · 0.65
sendFunction · 0.65
ComponentFunction · 0.65
createDevToolsFunction · 0.65
createInspectMachineFunction · 0.65
createDevToolsFunction · 0.65

Calls

no outgoing calls

Tested by 9

CounterFunction · 0.52
TestComponentFunction · 0.52
ComponentFunction · 0.52
constructorMethod · 0.52
ComponentFunction · 0.52
CounterFunction · 0.52
ComponentFunction · 0.52
CounterFunction · 0.52
ComponentFunction · 0.52