- 📚 Lots of documentation updates: https://xstate.js.org/docs
- 💥 Added the
.event
property toState
instances, so you can know which event caused the transition to the currentState
:
const lightMachine = Machine({ /* ... */ });
const currentState = lightMachine.transition('green', 'TIMER');
console.log(currentState.event);
// => { type: 'TIMER' }
- 👪 Fixed #269 by ensuring two things:
- Services invoked on the parent machine (which are alive for the lifetime of the machine, FYI) are successfully invoked when the machine is started
- Starting activities (such as
invoke
, which is an activity) should be executed before executingonEntry
actions.