Skip to content

Instantly share code, notes, and snippets.

@eldyvoon
Created December 17, 2019 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eldyvoon/2e9da1bccb9bc74ece88a32ccf1cb201 to your computer and use it in GitHub Desktop.
Save eldyvoon/2e9da1bccb9bc74ece88a32ccf1cb201 to your computer and use it in GitHub Desktop.
import useCounter from "./useCounter";
const CompOne = ({ initCounter }) => {
const [count, increase] = useCounter(initCounter);
return (
<div>
Count: {count}
<button onClick={increase}>+</button>
</div>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment