Last updated
Was this helpful?
Last updated
Was this helpful?
There are a bunch of well-constructed XState machines available to directly copy into your project from . For instance, I can grab the and paste it into confirmMachine.js
. Then I can grab which comes with a useMachine
hook.
The useMachine
call both interprets and starts up the machine service. The current
value is everything about the current state of the machine. The send
is a function for dispatching transitions between machine states.