Skip to content

Instantly share code, notes, and snippets.

@dougdroper
Last active September 23, 2020 18:03
Show Gist options
  • Save dougdroper/0e2b193c547582e6dc487387eebb3aa7 to your computer and use it in GitHub Desktop.
Save dougdroper/0e2b193c547582e6dc487387eebb3aa7 to your computer and use it in GitHub Desktop.
Idle*
Idle*
start -> AgeAndPostcode
AgeAndPostcode
answering*
finished -> valid?
valid?
allValid -> YourKit
invalid -> answering
underAge -> Kickout
overAge -> KickoutOverAge
outsideRegion -> Kickout
overQuota -> Kickout
Kickout
KickoutOverAge
YourKit
function render(model){
const current_state_name = model.active_states[0].name;
console.log(model)
return $("div",
{style: {color: "darkBlue"}},
`The current state is: ${(current_state_name)}`,
$('button', {onClick: () => model.emit('valid')}, 'click')
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment