Skip to content

Instantly share code, notes, and snippets.

@nhducit
Created April 21, 2020 11:03
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 nhducit/d7453f204c222ef6cccf9ee192aff56d to your computer and use it in GitHub Desktop.
Save nhducit/d7453f204c222ef6cccf9ee192aff56d 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: 'fetch',
initial: 'master',
context: {
retries: 0
},
states: {
master: {
on: {
CHECK_OUT: 'branch_a'
}
},
branch_a: {
on: {
COMMIT: 'branch_a',
COMMIT_AMMEND: 'branch_a',
REBASE_MASTER: 'branch_a',
MERGE_TO_DEVELOP: 'brance_a_merged',
}
},
brance_a_merged: {
type: 'final',
on: {
COMMIT: 'brance_a_merged',
COMMIT_AMMEND: 'brance_a_merged',
MERGE_MASTER: 'brance_a_merged',
MERGE_TO_DEVELOP: 'brance_a_merged'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment