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

State Colocation will make your React app faster

Current Available Translations: Korean One of the leading causes to slow React applications is global state, especially the rapidly changing variety. Allow me to illustrate my point with a super contrived example, then I'll give you a slightly more realistic example so you can determine how it can…

Read →

Profile a React App for Performance

The React DevTools is an amazing piece of software and is available as a browser extension for Chrome , Firefox , and is capable of being wired up to work with React app's anywhere. One of the coolest features of the React DevTools is its profiling capabilities. There's a lot to the profiler, and…

Read →

Fix the slow render before you fix the re-render

Performance is a serious issue and we should make our apps as fast as possible. How we go about doing that will make a big impact on not only the the effectiveness of our optimizations but also the complexity of our code (how quickly we can make improvements and changes in the future). When we're…

Read →

How to implement useState with useReducer

Here's the TL;DR: Wanna dive in? Let's go. But Kent... Why? For fun 🤓 Also I think that re-implementing things is a great way to learn how they work. State management in React React hooks expose two mechanisms for state management: useState and useReducer . Interestingly enough, React actually…

Read →

Write fewer, longer tests

Imagine we have this UI that renders a loading spinner until some data is loaded: Here's what that would render (I added a "Re-mount" button so you can try making it re-load. I also made it fail 50% of the time): Let's talk about testing this component. I'm going to mock out the api.getCourseInfo…

Read →

JavaScript to Know for React

Current Available Translations: Türkçe One of the things I love most about React compared to other frameworks that I've used is how exposed you are to JavaScript when you're using it. There's no template DSL (JSX compiles to sensible JavaScript), the component API has only gotten simpler with the…

Read →

How to get experience as a software engineer

Current Available Translations: Türkçe Here's the secret: More Problems, More Experience Here's one thing that I've observed in my time as a career software engineer: There's no shortcut to experience. You have to put in the time. That said, there are things that you can do to ensure that your…

Read →