From b8dcf09342ef4e04caef68c64c4a6edf856c76d9 Mon Sep 17 00:00:00 2001 From: Caleb Date: Mon, 27 Nov 2017 18:26:29 -0700 Subject: [PATCH] Add global error boundary. This adds an error boundary around the entire app, so that a crash does not just show up as an empty white screen. --- src/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index f517d586a021..1a5bcecf75ed 100644 --- a/src/index.js +++ b/src/index.js @@ -3,6 +3,7 @@ import createReactClass from 'create-react-class'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import 'normalize.css'; +import ErrorBoundary from './components/UI/ErrorBoundary/ErrorBoundary'; import Root from './root'; import registry from './lib/registry'; import './index.css'; @@ -21,7 +22,9 @@ document.body.appendChild(el); render(( - + + + ), el);