Skip to content

Instantly share code, notes, and snippets.

@tomByrer
Last active November 6, 2020 04:28
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 tomByrer/3b4f24dbd9c9033550aabb8165f18cab to your computer and use it in GitHub Desktop.
Save tomByrer/3b4f24dbd9c9033550aabb8165f18cab to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const verifyChoice = Machine({
id: 'vc',
type: 'parallel',
states: {
choiceA: {
initial: 'empty',
states: {
empty: {
on: {
CLICK: 'selected',
VERIFY: 'unselectedAnswer',
}
},
selected: {
on: {
CLICK: 'empty',
VERIFY: 'correctAnswer',
}
},
unselectedAnswer: {},
correctAnswer: {},
}
},
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment