Skip to content

Commit

Permalink
Add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Jan 1, 2022
1 parent 6450662 commit 4252ee2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .changeset/chatty-cats-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
'xstate': patch
---

Generated IDs for invocations that do not provide an `id` are now based on the state ID to avoid collisions:

```js
createMachine({
id: 'test',
initial: 'p',
states: {
p: {
type: 'parallel',
states: {
// Before this change, both invoke IDs would be 'someSource',
// which is incorrect.
a: {
invoke: {
src: 'someSource'
// generated invoke ID: 'test.p.a:invocation[0]'
}
},
b: {
invoke: {
src: 'someSource'
// generated invoke ID: 'test.p.b:invocation[0]'
}
}
}
}
}
});
```

0 comments on commit 4252ee2

Please sign in to comment.