Skip to content

Instantly share code, notes, and snippets.

@jamestharpe
Last active March 5, 2021 17:16
Show Gist options
  • Save jamestharpe/0d56630b39bbcb71ce03a1ece7eefded to your computer and use it in GitHub Desktop.
Save jamestharpe/0d56630b39bbcb71ce03a1ece7eefded to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const gasPump = Machine({
"id": "gas-pump",
"initial": "prepayment",
"states": {
"prepayment": {
"on": {
"PRE_PAY": "grade"
}
},
"grade": {
"on": {
"SELECT": "pump"
}
},
"pump": {
"on": {
"PUMP": "done"
}
},
"done": {
"on": {
"RESET": "prepayment"
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment