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

Function Test

packages/xstate-react/test/useActorRef.test.tsx:391–401  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

389 };
390
391 const Test = () => {
392 const actorRef = useActorRef(machine);
393 const childActor = useSelector(
394 actorRef,
395 (s) => s.children.child as ActorRefFrom<typeof childMachine>
396 );
397
398 isDone = useSelector(actorRef, (s) => s.matches('success'));
399
400 return <ChildTest actor={childActor} />;
401 };
402
403 render(<Test />);
404

Callers

nothing calls this directly

Calls 5

useActorRefFunction · 0.90
useSelectorFunction · 0.90
sendMethod · 0.80
getSnapshotMethod · 0.80
provideMethod · 0.80

Tested by

no test coverage detected