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 { render } from 'react-dom';
|
||||||
import { AppContainer } from 'react-hot-loader';
|
import { AppContainer } from 'react-hot-loader';
|
||||||
import 'normalize.css';
|
import 'normalize.css';
|
||||||
|
import ErrorBoundary from './components/UI/ErrorBoundary/ErrorBoundary';
|
||||||
import Root from './root';
|
import Root from './root';
|
||||||
import registry from './lib/registry';
|
import registry from './lib/registry';
|
||||||
import './index.css';
|
import './index.css';
|
||||||
@ -21,7 +22,9 @@ document.body.appendChild(el);
|
|||||||
|
|
||||||
render((
|
render((
|
||||||
<AppContainer>
|
<AppContainer>
|
||||||
<Root />
|
<ErrorBoundary>
|
||||||
|
<Root />
|
||||||
|
</ErrorBoundary>
|
||||||
</AppContainer>
|
</AppContainer>
|
||||||
), el);
|
), el);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user