assign is special action from XState used to update the machine's context
Assign gets current context and event as a params
on: {
INCREMENT: {
actions: assign({
// context will be an object with current value of `count: 0`
// event will be an object of type matching `INCREMENT`
count: (context, event) => context.count + 1
})
}
}