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

Function Component

packages/xstate-react/test/createActorContext.test.tsx:20–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 const SomeContext = createActorContext(someMachine);
19
20 const Component = () => {
21 const value = SomeContext.useSelector((state) => state.value as string);
22
23 return <div data-testid="value">{value}</div>;
24 };
25
26 const App = () => {
27 return (

Callers

nothing calls this directly

Calls 4

useSelectorFunction · 0.90
sendMethod · 0.80
sendFunction · 0.50
getPersistedSnapshotMethod · 0.45

Tested by

no test coverage detected