Skip to content

Instantly share code, notes, and snippets.

@eldyvoon
Created December 17, 2019 10:03
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/114d4227d4192cf720121dd42cceed0b to your computer and use it in GitHub Desktop.
Save eldyvoon/114d4227d4192cf720121dd42cceed0b to your computer and use it in GitHub Desktop.
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