---
title: "Failing Gracefully: Error Boundaries in React"
description: "Failing Gracefully: Error Boundaries in React"
canonical_url: "https://www.bigbinary.com/blog/error-boundaries-in-react"
markdown_url: "https://www.bigbinary.com/blog/error-boundaries-in-react.md"
---

# Failing Gracefully: Error Boundaries in React

Failing Gracefully: Error Boundaries in React

- Author: Dane David
- Published: May 18, 2021
- Categories: ReactJS

React 16 introduced the concept of "Error Boundaries" within component trees.
Web developers are often confused on its proper application; Should the entire
app be wrapped in a single error boundary? Or should each component be wrapped
in its own error boundary so that individual breakages don’t affect the whole
app?

Below is my talk from [React Day Bangalore](https://reactday.in/) that aims at
figuring out some common patterns and design decisions on when and where to use
React error boundaries for a fault tolerant React application.

<div class="youtube-video-container">
  <iframe
    width="560"
    height="315"
    src="https://www.youtube.com/embed/t5TfkIKUJE4"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
    allowfullscreen
  ></iframe>
</div>

## Useful links

- [Talk Slides](https://drive.google.com/file/d/1e2DXRNBYwRHGPJG0KQWK1DU8neZLXSqm/view)
- [New lifecycle method: getDerivedStateFromError [reddit]](https://www.reddit.com/r/reactjs/comments/9lp0k3/new_lifecycle_method_getderivedstatefromerror/)
- [react-error-boundary](https://kentcdodds.com/blog/use-react-error-boundary-to-handle-errors-in-react)

## Links

- [Human page](https://www.bigbinary.com/blog/error-boundaries-in-react)
