Skip to content

State Machine Interface

A minimal (pure) state machine in Matchina looks like this:

const { getState, send } = createMachine(
states, transitions, initialState
);

In Matchina, you first define your states using defineStates(), then use those states with createMachine() or matchina() to create a state machine. From there you can enhance and customize behavior using machine enhancers.