Using React Error Boundaries

Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed. More info

Articles & Tutorials

Simple error handling in React with react-error-boundary (
Sep 09, 2020
Errors are bound to happen in our applications, whether they’re server-related errors, edge cases, or others. As such, many methods have been developed to prevent these errors from interfering with user and developer experience. In React, one of such method is the use of error boundaries.
  • Yusuff Faruq
Use react-error-boundary to handle errors in React (
Jul 20, 2020
How to simplify your React apps by handling React errors effectively with react-error-boundary
React Error Handling And Reporting With Error Boundary And Sentry (
Jun 01, 2020
In this article, we’ll explore the concept of error boundaries in a React application. We’ll work through an example app to see how we can use error boundaries to deliver a better app experience. Finally, we’ll integrate Sentry into our error boundary for realtime error reporting.
  • Chidi Orji
Understanding Error Boundaries in React (
Apr 27, 2020
Using the analog for try/catch in React components.
  • Chidume Nnamdi
A Simple Guide to Error Boundaries in React (
Mar 11, 2020
In this article, you’ll learn about Error Boundaries via code snippets and interactive demos. If you’re still wondering what Error Boundaries are and how they work, this simple guide is for you!
  • William Le
Catch Your Suspense Errors (
Oct 30, 2019
Not every promise resolves. Some are rejected. So, when we use React.Suspense to show loading and loaded states, we need to consider exceptions as well.
Understanding Error Boundaries in React (
Feb 20, 2019
In JavaScript we handle most errors during execution of code with a try catch. A try block is the block of code in which exceptions occur. A catch block catches and handles try block exceptions.
  • Nwose Lotanna
Error Handling in React (
Dec 14, 2018
Let's deal with those pesky errors once and for all
  • Kristofer Selbekk
Handling Errors with Error Boundary (
Jun 26, 2018
React 16 came with a lot of goodies, one of which is error boundaries.
  • Kingsley Silas
Component error handling in React using Error Boundaries (
May 23, 2018
In this tutorial, we will handle Component Error in React using Error Boundaries. Before React 16, errors emitted from a component’s rendering proved hard to handle.
React v16.0 (
Sep 26, 2017
We’re excited to announce the release of React v16.0! Among the changes are some long-standing feature requests, including fragments, error boundaries, portals, support for custom DOM attributes, improved server-side rendering, and reduced file size.
Error Handling in React 16 (
Jul 26, 2017
As React 16 release is getting closer, we would like to announce a few changes to how React handles JavaScript errors inside components. These changes are included in React 16 beta versions, and will be a part of React 16.

Video Guides & Talks

Handling errors with error boundaries (
Apr 30, 2018
When something goes wrong, React turns your whole app blank. You can fix that with error boundaries.
Error Boundaries and Render Props (
Apr 05, 2018
How to implement and test an error boundary in React. Error boundaries allow us to catch errors (and display friendly messages to our users) that occur during render in our components. We'll implement the error boundary using render props and see how to suppress an annoying error message during testing.

Courses & Video Series

Leverage New Features of React 16 (
Sep 27, 2017
React 16 comes with some powerful new features, in this course we'll be exploring each of them.