Created
January 8, 2019 15:01
-
-
Save ajcrites/fadc0dc16879c4005d93f60d5c0ae58e to your computer and use it in GitHub Desktop.
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
export const TimesTableApp = () => { | |
const [pointCount, setPointCount] = useState(10); | |
const [timesTable, setTimesTable] = useState(2); | |
const [lineColor, setLineColor] = useState('#000000'); | |
const state: TimesTableContextProps = { | |
pointCount, | |
timesTable, | |
lineColor, | |
setPointCount, | |
setTimesTable, | |
setLineColor | |
}; | |
return ( | |
<TimesTableContext.Provider value={this.state}> | |
<TimesTable /> | |
<TimesTableControls /> | |
</TimesTableContext> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment