Skip to content

Instantly share code, notes, and snippets.

@davidkpiano
Last active January 21, 2020 04:16
Show Gist options
  • Save davidkpiano/5e79ce9f5dfbbcc56f745cdf2e6337e6 to your computer and use it in GitHub Desktop.
Save davidkpiano/5e79ce9f5dfbbcc56f745cdf2e6337e6 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
Machine({
initial: 'inJira',
states: {
inJira: {
on: {
'': [
{
target: 'matchingOrg',
actions: 'cache',
cond: () => true
},
{
target: 'createUser',
cond: () => false
}
]
}
},
matchingOrg: {
on: {
'': [
{
target: 'finished',
actions: 'api-1',
cond: () => true
},
{
target: 'finished',
actions: 'api-2',
cond: () => false
}
]
}
},
createUser: {
on: {
'': [
{
target: 'finished',
actions: 'api-3',
cond: () => true
},
{
target: 'finished',
actions: 'api-4',
cond: () => false
}
]
}
},
finished: {
type: 'final'
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment