Skip to content

Instantly share code, notes, and snippets.

@janhesters
Created September 26, 2020 12:43
Show Gist options
  • Save janhesters/2a0844eea84d5a9482c2a3a8b4ecd5d4 to your computer and use it in GitHub Desktop.
Save janhesters/2a0844eea84d5a9482c2a3a8b4ecd5d4 to your computer and use it in GitHub Desktop.
Home page container.
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