Skip to content

Instantly share code, notes, and snippets.

@okonet
Created February 12, 2020 10:04
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 okonet/b98ab809a435ec485f2a0bc8014db903 to your computer and use it in GitHub Desktop.
Save okonet/b98ab809a435ec485f2a0bc8014db903 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const patterJourneyMachine = Machine({
id: 'pattern',
initial: 'Pattern exists in the UI library?',
states: {
"Pattern exists in the UI library?": {
on: {
YES: 'Does it fulfill all the requirements?',
NO: 'Similar pattern exists in other projects?'
}
},
"Does it fulfill all the requirements?": {
on: {
YES: 'Just use it!',
NO: 'Can be modified to fulfill all requirements?'
}
},
"Can be modified to fulfill all requirements?": {
on: {
YES: "Implement in the UI library",
NO: "Other teams ready to use altered version?"
}
},
"Similar pattern exists in other projects?": {
on: {
YES: "Can the existed pattern be used?",
NO: "Can be used by other projects in the future?"
}
},
"Other teams ready to use altered version?": {
on: {
YES: "Implement in the UI library",
NO: "Implement in the project"
}
},
"Can be used by other projects in the future?": {
on: {
YES: "Implement in the UI library",
NO: "Implement in the project"
}
},
"Can the existed pattern be used?": {
on: {
YES: "Implement in the UI library",
NO: "Other teams ready to use altered version?"
}
},
"Implement in the UI library": {
type: 'final'
},
"Implement in the project": {
type: 'final'
},
"Just use it!": {
type: 'final'
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment