Last active
November 16, 2018 12:56
-
-
Save bodia-uz/6b26868496c839e25fb6c0ba3741835b to your computer and use it in GitHub Desktop.
Root
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Root | |
Inactive* | |
reviewRegions -> Regions | |
reviewTwoOptions -> TwoOptions | |
Active | |
Question | |
Regions | |
RegionsReview* | |
close -> Inactive | |
edit -> RegionsEdit | |
answer -> ThankU | |
RegionsEdit | |
cancel -> RegionsReview | |
submit -> ThankU | |
TwoOptions | |
TwoOptionsReview* | |
close -> Inactive | |
answer -> ThankU | |
ThankU | |
close -> Inactive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render(model){ | |
const currentState = model.active_states[0].name; | |
const isInactive = currentState === 'Inactive'; | |
return ( | |
<div> | |
<h1>{currentState}</h1> | |
<button onClick={() => model.emit('reviewRegions')} disabled={!isInactive}>Regions</button> | |
<button onClick={() => model.emit('reviewTwoOptions')} disabled={!isInactive}>Two Options</button> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment