There are four events that cause a React component to render:
- State change
- Prop change
- Parent render
- Context change
When state changes, you can skip the render via:
When props change or a parent renders, you can skip … Read on...
There are four events that cause a React component to render:
When state changes, you can skip the render via:
When props change or a parent renders, you can skip … Read on...
While preparing my upcoming Pluralsight course “Managing React State”, I found a surprising number of React state management options.
This slide from the upcoming course summarizes eight ways to handle state in React apps:
Throughout the course, I build a … Read on...
Here’s a question I’ve heard a few times recently:
“What if we create a component library in React/Vue/Angular/whatever and a new component technology replaces it?”
That’s not a question of if. It’s a question of when. These technologies have become … Read on...
React is a component library. So React makes it easy to break your UI down into composable pieces. The question is, how granular should the pieces be?
Let’s consider a … Read on...
There are three popular ways to handle types in React: PropTypes, TypeScript and Flow. This post is about PropTypes, which are currently the most popular.
… Read on...📊 For enforcing types in React, I typically use…
A decade ago, nearly everyone was rendering their web applications on the server using technologies like ASP.NET, Ruby on Rails, Java, and PHP.
Then handy libraries like jQuery showed up, and suddenly server-side rendering everything didn’t necessarily make sense anymore. … Read on...
JavaScript’s this keyword behavior has confused developers for ages.
There are at least five ways to handle the this context in React. Let’s consider the merits of each approach.
If you use React.createClass, React autobinds all … Read on...
After over 6 months of preparation, research, writing, and recording, “Building Applications in React and Redux in ES6” just published on Pluralsight! This isn’t merely an introduction to Redux. This is a comprehensive exploration of building a real … Read on...
These days it feels like everyone is attacking classes in JavaScript. Developers I respect say ES6 classes are a virus. We’ve compiled long lists on the reasons that ES6 classes are not awesome. Apparently, if we’re still brave enough to … Read on...
When React was released, many people took one look at JSX and lost their minds. What are these angle brackets doing in JavaScript?! What about separation of concerns? Has Facebook learned nothing from the community?
… Read on...Facebook: Rethink established best practices™