Skip to content

Instantly share code, notes, and snippets.

@pinhopro
Last active November 4, 2021 21:23
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 pinhopro/e5e54f26a665cffd66f8e690e1baa06b to your computer and use it in GitHub Desktop.
Save pinhopro/e5e54f26a665cffd66f8e690e1baa06b 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({
id: 'jornada_comprador',
initial: 'landing',
context: {
retries: 0
},
states: {
landing: {
on: {
LOGIN: 'login',
TERMS_OF_SERVICE: 'terms'
}
},
login:{
on: {
INFORMA_EMAIL: 'confirma_email',
}
},
confirma_email: {
on: {
LINK_CONFIRMACAO: 'pede_telefone',
}
},
pede_telefone: {
on: {
INFORMA_NO_TELEFONE: 'pede_nome',
}
},
pede_nome: {},
terms: {
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment