#317 Catching errors in React with error boundaries
this week's favorite
Even the most flawless applications have runtime errors from time to time. The network might time out, some backend service might go down, or your users might provide you with some input that just doesn’t compute. Or – you know – bugs. But what’s the best way to handle errors to ensure your app is resilient, continues to be responsive and provide the best possible user experience?
The redux style guide has an important rule: “Connect More Components to Read Data from the Store”. This rule has some important performance aspects that are covered with an example in this post.
A common question readers ask is how to make D3 force-directed graphs work with React. It's a little tricky. You'd think it's obvious – use D3 to drive the force simulation, React for rendering.
You can often see an event handler passed to a React component as an anonymous function. This will cause the child component to re-render when the parent renders, even if you wrap the child in memo. Let’s figure out why.
A simple, scalable, and powerful architecture for building production ready React applications.