Created
September 26, 2020 12:43
-
-
Save janhesters/2a0844eea84d5a9482c2a3a8b4ecd5d4 to your computer and use it in GitHub Desktop.
Home page container.
This file contains 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 React, { useState } from 'react'; | |
import HomePageComponent from './home-page-component.js'; | |
function HomePage() { | |
const [count, setCount] = useState(0); | |
function handleIncrementClick() { | |
setCount(c => c + 1); | |
} | |
const props = { | |
count, | |
onIncrementClick: handleIncrementClick, | |
}; | |
return <HomePageComponent {...props} />; | |
} | |
export default HomePage; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment