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 ...
My heart aches for the dozens of engineer’s I’ve met so far this year who have had such rough luck finding their first full-time job. I’m regularly asked for advice on this subject and I’m afraid the best I can ...
This is a great follow-up to But really, what is a JavaScript test? So here we go! Step 0 To learn about mocks we have to have something to test and something to mock, so here’s the module we’ll be ...
A few weeks ago, I saw this tweet from Ingvar Stepanyan: 🇺🇦 Ingvar Stepanyan @RReverser Starting to think that ES6 modules missed an opportunity of specifying modules as completely pure (only exports / imports allowed, no execution at the top ...
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 ...
Two weeks ago, I wrote a new library! I’ve been thinking about it for a while. But two weeks ago I started getting pretty serious about it: Kent C. Dodds 🌌 @kentcdodds I’m seriously starting to think that I should ...
The goal of this post is to not only help you understand what prop drilling is (some also refer to it as “threading”), but also when it can be a problem and mechanisms you can use to side-step or avoid ...