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

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 →

How to optimize your context value

NOTE: I want to add that the times it's important to optimize your context value is when a certain combination of the following conditions are met: Your context value changes frequently Your context has many consumers You are bothering to use React.memo (because things are legit slow) You've…

Read →

How to use React Context effectively

In Application State Management with React , I talk about how using a mix of local state and React Context can help you manage state well in any React application. I showed some examples and I want to call out a few things about those examples and how you can create React context consumers…

Read →

Application State Management with React

Managing state is arguably the hardest part of any application. It's why there are so many state management libraries available and more coming around every day (and even some built on top of others... There are hundreds of "easier redux" abstractions on npm). Despite the fact that state management…

Read →

How to know what to test

Knowing how to test is great and important. I've created a LOT of content that teaches people the fundamentals of testing, how to configure tools, how to write tests for specific scenarios, and so on. But knowing how to write tests is only half the battle to achieve confidence in your application…

Read →