Skip to content

Instantly share code, notes, and snippets.

@jefrydco
Created March 30, 2021 10:06
Show Gist options
  • Save jefrydco/df5a3c95e9c256a6dba1d7e766e7dd87 to your computer and use it in GitHub Desktop.
Save jefrydco/df5a3c95e9c256a6dba1d7e766e7dd87 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: 'screen',
initial: 'init',
states: {
init: {
on: {
LOADING: 'loading'
}
},
loading: {
on: {
LOADING: 'loading',
INIT: 'init',
TAPTAP: 'taptap',
QUIZZ: 'quizz',
PROGRESS: 'progress',
RESULT: 'result',
LEADERBOARD: 'leaderboard',
HELPME: 'helpme',
ERROR: 'error'
}
},
taptap: {
on: {
LOADING: 'loading'
}
},
quizz: {
on: {
LOADING: 'loading'
}
},
progress: {
on: {
LOADING: 'loading'
}
},
result: {
on: {
LOADING: 'loading'
}
},
helpme: {
on: {
LOADING: 'loading'
}
},
leaderboard: {
on: {
LOADING: 'loading'
}
},
error: {
on: {
LOADING: 'loading'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment