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

When to break up a component into multiple components

Current Available Translations: Korean Did you know that you could write any React Application as a single React Component? There's absolutely nothing technically stopping React from putting your entire application into one giant component. Your function would be HUGE. There'd be a TON of hooks for…

Read →

Write tests. Not too many. Mostly integration.

Current Available Translations: Korean Russian Portuguese I've given this blog post as a talk which you can watch here: https://youtu.be/Fha2bVoC8SE?list=PLV5CVI1eNcJgNqzNwcs4UKrlJdhfDjshf A while back, Guillermo Rauch‏ (creator of Socket.io and founder of Zeit.co (the company behind a ton of…

Read →

React Fundamentals: Props vs State

Let's compare props and state. Here's a definition of each: "props" (short for "properties") is an object of arbitrary inputs a React function component accepts as the first argument. "state" is data that changes over the lifetime of a specific instance of a React component. Let's dive into each…

Read →

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 →