Last active
September 23, 2018 21:58
-
-
Save ShMcK/6441a84d1ba701583cf22bab4edd3f67 to your computer and use it in GitHub Desktop.
xstateful-react-provider
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
import * as React from 'react' | |
import { Display, Time } from './components' | |
import ClockMachine from './Machine' | |
export default class Clock extends React.Component { | |
render() { | |
return ( | |
<ClockMachine.Provider> | |
<ClockMachine.Control onDidMount={this.init}> | |
<Display> | |
<Time /> | |
</Display> | |
</ClockMachine.Control> | |
</ClockMachine.Provider> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment