xstate icon indicating copy to clipboard operation
xstate copied to clipboard

Add a reference to the root actor on the system object

Open kevinmaes opened this issue 1 year ago • 3 comments

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' });

kevinmaes avatar Jun 12 '23 20:06 kevinmaes

🦋 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

changeset-bot[bot] avatar Jun 12 '23 20:06 changeset-bot[bot]

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

codesandbox-ci[bot] avatar Jun 12 '23 20:06 codesandbox-ci[bot]

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

ghost avatar Jun 12 '23 23:06 ghost