Minor Changes
-
#4746
b570ba20d
Thanks @davidkpiano! - The newemit(…)
action creator emits events that can be received by listeners. Actors are now event emitters.import { emit } from 'xstate'; const machine = createMachine({ // ... on: { something: { actions: emit({ type: 'emitted', some: 'data' }) } } // ... }); const actor = createActor(machine).start(); actor.on('emitted', (event) => { console.log(event); }); actor.send({ type: 'something' }); // logs: // { // type: 'emitted', // some: 'data' // }
-
#4777
4abeed9df
Thanks @Andarist! - Added support forparams
toenqueueActions