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

Function send

packages/xstate-store/src/atom.ts:316–326  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

314 get: atom.get.bind(atom),
315 subscribe: atom.subscribe.bind(atom),
316 send(event) {
317 const prevSub = activeSub;
318 activeSub = undefined;
319 let nextState: TState;
320 try {
321 nextState = reducer(atom.get(), event);
322 } finally {
323 activeSub = prevSub;
324 }
325 atom.set(nextState);
326 }
327 };
328}
329

Callers 15

store.test.tsFile · 0.50
ElementFunction · 0.50
FetcherFunction · 0.50
ComponentFunction · 0.50
ToggleFunction · 0.50
AppFunction · 0.50
ChildTestFunction · 0.50
TestFunction · 0.50
ComponentFunction · 0.50
FetcherFunction · 0.50
SpawnerFunction · 0.50
ToggleFunction · 0.50

Calls 3

reducerFunction · 0.85
getMethod · 0.80
setMethod · 0.65

Tested by 15

ElementFunction · 0.40
FetcherFunction · 0.40
ComponentFunction · 0.40
ToggleFunction · 0.40
AppFunction · 0.40
ChildTestFunction · 0.40
TestFunction · 0.40
ComponentFunction · 0.40
FetcherFunction · 0.40
SpawnerFunction · 0.40
ToggleFunction · 0.40
AppFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…