Machine({ id: 'counter', initial: 'active', context: { count: 0 }, states: { active: { on: { INCREMENT: { actions: assign({ count: (context) => context.count + 1 }), }, DECREMENT: { actions: assign({ count: (context) => context.count - 1 }), }, }, }, }, })
const createCatsMachine = getCats => categoryId => Machine({ id: 'catsMachine', initial: STATES.IDLE,
Machine({ id: 'users', initial: states.NOT_LOADED,
const createStoryMachine = story => Machine({ id: 'story', initial: 'init',
Machine({ id: 'todos', initial: 'active',
const createCategoriesMachine = getCategories => Machine({ id: 'categoriesMachine', initial: 'idle',
Machine({ id: 'app', initial: 'init',
Machine({ id: 'todos', initial: 'active',