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:
parent
44cc9cbd6f
commit
68f00987d2
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user