A state machine is a method of modeling a finite number of states and events. When an event is sent, actions and transitions are triggered within the machine to update it's state.
Here we model a a state machine for a check box. There are unchecked
and checked
states with a click
event that transitions the machine between these two states.