Created
March 30, 2021 10:06
-
-
Save jefrydco/df5a3c95e9c256a6dba1d7e766e7dd87 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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