Skip to content

Instantly share code, notes, and snippets.

@florianmutter
Created September 27, 2021 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save florianmutter/ebbf76ec559f71c1267782d10da8d618 to your computer and use it in GitHub Desktop.
Save florianmutter/ebbf76ec559f71c1267782d10da8d618 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 fetchMachine = Machine({
key: 'checkout',
initial: 'guestOrLogin',
context: { elapsed: 0 },
states: {
guestOrLogin: {
on: {
LOGGED_IN: { target: 'billingAddress' },
CONTINUE_AS_GUEST: { target: 'billingAddress' },
},
},
billingAddress: {},
delivery: {},
payment: {
},
overview: {},
thankyou: {},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment