Skip to content

jeron-diovis/react-app-error-boundary-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo: react-app-error-boundary

Demonstrates how react-app-error-boundary package works.

Disables react-error-overlay in create-react-app for a particular error boundary (instead of disabling it once and for all).

How to use

git clone https://github.com/jeron-diovis/react-app-error-boundary-demo.git
cd react-app-error-boundary-demo
npm install
npm start

Open http://localhost:3000

What you should observe

When checkbox Enable react-error-overlay is off, after clicking "explode" button:

  • it'll immediately show error fallback element.
  • in console you'll see message Following error has been caught by <ErrorBoundary> component ...

When checkbox is on:

  • react-error-overlay will appear as it does by default in react-app
  • in console you'll see Uncaught Error ...