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

Function TestComponent

packages/xstate-store-react/src/index.test.tsx:168–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

166 const atom = createAtom(42);
167
168 const TestComponent = () => {
169 const value = useAtom(atom);
170 return <div data-testid="value">{value}</div>;
171 };
172
173 render(<TestComponent />);
174 expect(screen.getByTestId('value').textContent).toBe('42');

Callers

nothing calls this directly

Calls 3

useAtomFunction · 0.90
useAtomStateFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…