flâneur — a map of the web's best reading

Common Beginner Mistakes with React • Josh W. Comeau

joshwcomeau.com · 4,583 words · saved by 1 readers

A couple years ago, I was teaching React at a local coding bootcamp, and I noticed that there were a handful of things that kept catching students off guard. People kept falling into the same pits! In this tutorial, we're going to explore 9 of the most common gotchas. You'll learn how to steer around them, and hopefully avoid a lot of frustration. In order to keep this blog post light and breezy, we won't dig too much into the reasons behind these gotchas. This is more of a quick reference. This article is written for developers that are familiar with the basics of React, but are still pretty early in their journey. Alright, let's start with one of the most pervasive gotchas. I've seen this one “in the wild” on a handful of production apps! Take a look at the following setup: Code Playground Our goal is to conditionally show a shopping list. If we have at least 1 item in the array, we should render a ShoppingList element. Otherwise, we shouldn't render anything. And yet, we wind up wit

Introduction A couple years ago, I was teaching React at a local coding bootcamp, and I noticed that there were a handful of things that kept catching students off guard. People kept falling into the same pits! In this tutorial, we're going to explore 9 of the most common gotchas. You'll learn how to steer around them, and hopefully avoid a lot of frustration. In order to keep this blog post light and breezy, we won't dig too much into the reasons behind these gotchas. This is more of a quick reference. Intended audience This article is written for developers that are familiar with the basics

Explore this link on the map →

related reading