Skip to content

Commit

Permalink
Add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Jul 16, 2021
1 parent 1aa1bf8 commit 5e1223c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .changeset/heavy-carrots-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'xstate': patch
---

The `context` property has been removed from `StateNodeConfig`, as it has never been allowed, nor has it ever done anything. The previous typing was unsafe and allowed `context` to be specified on nested state nodes:

```ts
createMachine({
context: {
/* ... */
}, // ✅ This is allowed
initial: 'inner',
states: {
inner: {
context: {
/* ... */
} // ❌ This will no longer compile
}
}
});
```

0 comments on commit 5e1223c

Please sign in to comment.