Version: XState v4
XState basics
Learn the basics of XState.
What is a statechart?
Install XState and create a statechart by importing createMachine from xstate.
Options
Statecharts require that a machine is separated into two parts. The first part is the machine’s config. The config describes how the machine behaves — its states, events and transitions.
Inline vs. named Options
Named actions are when you pass options into the config using names. You can also declare your actions inline without names.