Skip to content

Commit

Permalink
Add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Mar 19, 2024
1 parent 007b78d commit 21f09e2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .changeset/shaggy-kings-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'xstate': patch
---

Ensure that "stop" transitions are called in machines:

```ts
const machine = createMachine({
on: {
'xstate.stop': {
actions: () => {
// do cleanup, etc...
console.log('Machine actor was just stopped');
}
}
}
});

const actor = createActor(machine).start();

actor.stop();
// Logs "Machine actor was just stopped"
```

0 comments on commit 21f09e2

Please sign in to comment.