xstate
xstate copied to clipboard
Remove traces of the `StateNodeConfig["key"]`
Follow-up to https://github.com/statelyai/xstate/pull/3455/files#r967087849
⚠️ No Changeset found
Latest commit: 4ca13234ba9adace55111539796f38ef089d229c
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a 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 4ca13234ba9adace55111539796f38ef089d229c:
| Sandbox | Source |
|---|---|
| XState Example Template | Configuration |
| XState React Template | Configuration |
👇 Click on the image for a new way to code review
-
Make big changes easier — review code in small groups of related files
-
Know where to start — see the whole change at a glance
-
Take a code tour — explore the change with an interactive tour
-
Make comments and review — all fully sync’ed with github
Legend

Before merging this in, let me think about naming...
idhere should serve as only the root state node ID- The
id(orname?) that the parent gives the child is for identifying the entire child actor - The root state node ID should not be used to self-identify the actor; only the state node
With that said, is id still the best name? I think probably yes, but we should document the difference in behavior from v4 that this:
spawn(someMachine, 'some-id');
Is different from this:
const someMachine = createMachine({
id: 'rootNodeId'
})