xstate
xstate copied to clipboard
Add a reference to the root actor on the system object
This would allow any actor within the system to send events to the system's root actor without needing to know the root's systemId
that's passed into interpret(rootActor, { systemId: 'root-id' })
Example: Sending a message to the root from any actor in the system:
sendTo(({ system } ) => system.root, { type: 'to root', message: 'Message to root' });
🦋 Changeset detected
Latest commit: 57fb74b2945ece2d1f6df43e2ecaf6d7de3034f2
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
Name | Type |
---|---|
xstate | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 57fb74b2945ece2d1f6df43e2ecaf6d7de3034f2:
Sandbox | Source |
---|---|
XState Example Template | Configuration |
XState React Template | Configuration |