Minor Changes
-
7367de2
#946 Thanks @Andarist! - Added a second, optional,options
parameter to thecreateMachine
. Currently onlyactions
map can be put there - similarly how this can be done forxstate
itself:Example
const machine = createMachine({ initial: 'idle' states: { idle: { on: { LOAD: { target: 'loading', actions: 'fetchData' } } }, loading: { // ... } } }, { actions: { fetchData: () => /* ... */ } })
-
3c10215
#811 Thanks @ghengeveld! - Aconfig
property got exposed on created machines. It's the same object which got passed in as argument.