statemachine
Create a statemachine
import { statemachine } from 'overmind'
export const machine = statemachine({
FOO: {
TOGGLE: () => ({ current: 'BAR' })
},
BAR: {
TOGGLE: () => ({ current: 'FOO' })
}
})Instantiate machine
Transition between states
Matching state
Last updated