This site runs best with JavaScript enabled.
Looking for something specific? Search for a blogpost here.

How I Teach

I've been teaching programming for a long time. From the very beginning actually. I signed up to be a tutor in my first programming class. I did it out of an effort to solidify what I was learning . Through the years, I've changed the way that I teach programming concepts to people. In the last few…

Read →

One simple trick to optimize React re-renders

I was preparing a blog post on a subject related to React re-renders when I stumbled upon this little React gem of knowledge I think you'll really appreciate: https://twitter.com/kentcdodds/status/1143200604065431552 After reading this blog post, Brooks Lybrand implemented this trick and this was…

Read →

Colocation

We all want to have codebases that are easy to maintain, so we start out with the best of intentions to make our codebase (or our corner of the codebase) maintainable and easy to understand. Over time, as a codebase grows, it can become more and more difficult to manage dependencies (JS, CSS, images…

Read →

When to useMemo and useCallback

Current Available Translations: Korean Chinese Here's a candy dispenser: Here's how it's implemented: Now I want to ask you a question and I want you to think hard about it before moving forward. I'm going to make a change to this and I want you to tell me which will have the better performance…

Read →

What open source project should I contribute to?

This is a question I've had countless times: https://twitter.com/sarna_pranu/status/672438850724175872 Pranu first pull request soon after tweeting this https://twitter.com/geraldchecka/status/670445392706736128 And in direct messages, emails, etc. The general gist of it is: "What open source…

Read →

Avoid the Test User

The two users your UI code has are 1) The end user that's interacting with your component and 2) the developer rendering your component. Imagine you have the following UI (taken from my Advanced React Patterns material): Note: this is not a screenshot. You can actually interact with that form…

Read →

Authentication in React Applications

Skipping to the end Here's the secret to this blog post in one short code example: That's it. Most apps which require authentication of any kind can be drastically simplified by that one little trick. Rather than trying to do something fancy to redirect the user when they happen to land on a page…

Read →