Skip to content

Instantly share code, notes, and snippets.

@eldyvoon
Created Dec 17, 2019
Embed
What would you like to do?
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