Skip to content

Instantly share code, notes, and snippets.

@markmelville
Created June 17, 2020 19:20
Show Gist options
  • Save markmelville/77b70a670ae5f8af467dab95dc7fde77 to your computer and use it in GitHub Desktop.
Save markmelville/77b70a670ae5f8af467dab95dc7fde77 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: 'onboard_stack',
initial: 'start',
context: {
stack_id: "test_id"
},
states: {
start: {
on: {
BEGIN: 'createStackId'
}
},
createStackId: {
on: {
SUCCESS: 'createRepo',
FAILURE: 'createStackFailed'
}
},
createStackFailed: {
on: {
RETRY: 'createStackId'
}
},
createRepo: {
on: {
SUCCESS: 'creatingRoles',
FAILURE: 'createRepoFailed'
}
},
createRepoFailed: {
on: {
RETRY: 'createRepo'
}
},
creatingRoles: {
on: {
COMPLETE: 'done'
}
},
done: {
type: 'final'
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment