v3.0.1
This is the officially published v3 of xstate
! 🎉
Some changes from V1 and V2:
machine.transition
will always return aState
object.- 🆕
onEntry
,onExit
actions for states, andactions
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:
- Versions are cheap.
- 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.