This post is only kept around for historical purposes. If you can use react@16.8.0 then the answer is to rarely use render props and almost always use a custom hook. Hooks are almost always the superior approach. Read about when ...

Check this out: The example itself is a little unimpressive from a user experience standpoint (it’s based on someone else’s actual use-case and I didn’t have a chance to update it to look pretty). But the underlying code there is ...

About a year ago, I published “How to give rendering control to users with prop getters”. In that post, I show the entire implementation (at the time) of react-toggled which I actually built for the sole purpose of teaching some ...

Watch “Implement Inversion of Control” on egghead.io If you’ve ever built code that was used in more than one place before, then you’re likely familiar with this story: You build a reusable bit of code (function, React component, or React ...