Skip to content

Instantly share code, notes, and snippets.

@eldyvoon
Created Dec 17, 2019
Embed
What would you like to do?
import Counter from "./renderPropCounter";
const CompOne = ({ initCounter }) => (
<Counter initCounter={initCounter}>
{({ count, increase }) => (
<div>
Count: {count}
<button onClick={increase}>+</button>
</div>
)}
</Counter>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment