Skip to content

Instantly share code, notes, and snippets.

@ajcrites
Created January 8, 2019 15:01
Show Gist options
  • Save ajcrites/fadc0dc16879c4005d93f60d5c0ae58e to your computer and use it in GitHub Desktop.
Save ajcrites/fadc0dc16879c4005d93f60d5c0ae58e to your computer and use it in GitHub Desktop.
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