Skip to content

Instantly share code, notes, and snippets.

@janhesters
Created September 26, 2020 12:35
Show Gist options
  • Save janhesters/ea313c54e5023ec7a90bf378439e8f7b to your computer and use it in GitHub Desktop.
Save janhesters/ea313c54e5023ec7a90bf378439e8f7b to your computer and use it in GitHub Desktop.
Home page component.
import React from 'react';
const HomePage = ({ count, onIncrementClick = () => {} }) => (
<main>
<p className="count" data-testid="count">
{count}
</p>
<button className="increment-button" onClick={onIncrementClick}>
Increment
</button>
</main>
);
export default HomePage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment