Skip to content

v3.0.1

Compare
Choose a tag to compare
@davidkpiano davidkpiano released this 08 Jan 15:18
· 6468 commits to main since this release

This is the officially published v3 of xstate! 🎉

Some changes from V1 and V2:

  • machine.transition will always return a State object.
  • 🆕 onEntry, onExit actions for states, and actions for transition actions
  • 🆕 cond for conditional (guarded) transitions
  • 🆕 strict: true for strict mode (helpful in development)
  • Many more awesome things. For more information, read the docs.

If you're wondering why V3 and not V2:

  1. Versions are cheap.
  2. V2 was more of a sandbox version to test and dogfood new APIs. Those APIs have been solidified (thanks to help from the community) and have been released as V3, in case anyone (like myself) was using the undocumented V2 APIs.