Skip to content

Instantly share code, notes, and snippets.

@hypeJunction
Created February 13, 2021 17:36
Show Gist options
  • Save hypeJunction/371a1aebe61f1ad6d67f0c8fcfdf758f to your computer and use it in GitHub Desktop.
Save hypeJunction/371a1aebe61f1ad6d67f0c8fcfdf758f to your computer and use it in GitHub Desktop.
function App () {
return (
<StateMachine
states={states}
initialContext={{
message: {
recipient: '',
text: '',
}
}}
initialState={'initializing'}
>
<State is={'initializing'}>
<Transition transitionName={'load_draft'} />
</State>
<State is={'writing'}>
<ComposerView/>
</State>
<State is={'sent'}>
<MessageView/>
</State>
</StateMachine>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment