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

React Hooks: Array Destructuring Fundamentals

This is the first example on the https://reactjs.org/hooks documentation: That const [count, setCount] = useState(0); is the line we're going to be talking about today. The syntax here is called "array destructuring" and it was introduced into JavaScript in the infamous ( more than famous ) ES…

Read →

React Hooks: What's going to happen to my tests?

Current Available Translations: Korean One of the most common questions I hear about the upcoming React Hooks feature is regarding testing. And I can understand the concern when your tests look like this: That enzyme test works when Accordion is a class component where the instance actually…

Read →

React Hooks: What's going to happen to react context?

Earlier this year, the React team introduced the first official context API. I blogged about that new API and people got sufficiently and reasonably hyped. One common complaint that I knew people were going to have when applying it practically was the fact that the context consumer is a render…

Read →

React Hooks: What's going to happen to render props?

Current Available Translations: Korean About a year ago, I published "How to give rendering control to users with prop getters" . In that post, I show the entire implementation (at the time) of react-toggled which I actually built for the sole purpose of teaching some of the patterns that I used…

Read →

Introducing a new course: Simplify React Apps with React Hooks and Suspense

Learn about the massive improvements coming to function components in React via a fresh new course showing you how to refactor an existing app to these new and upcoming APIs. Ok, before I get into things, can I just say that this course artwork by Maggie Appleton and Maxime Bourgeois is just…

Read →

How Gratitude can make you a better developer

This week in the United States we celebrate Thanksgiving Day . In the US, the celebration was started by Pilgrims who came to America in the 1620s on the Mayflower . They had a pretty rough time getting their settlement started and had help from the Native Americans. Together they celebrated and…

Read →

useEffect vs useLayoutEffect

Both of these can be used to do basically the same thing, but they have slightly different use cases. So here are some rules for you to consider when deciding which React Hook to use. useEffect 99% of the time this is what you want to use. When hooks are stable and if you refactor any of your…

Read →