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.
This commit is contained in:
Caleb 2017-11-27 18:26:29 -07:00 committed by Shawn Erquhart
parent 44cc9cbd6f
commit 68f00987d2

View File

@ -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((
<AppContainer>
<Root />
<ErrorBoundary>
<Root />
</ErrorBoundary>
</AppContainer>
), el);