Skip to content
This repository has been archived by the owner on Apr 11, 2019. It is now read-only.

Commit

Permalink
Fix development set up issue
Browse files Browse the repository at this point in the history
There was an issue when developing locally where the console would show
this error:

> Error: React-Hot-Loader: AppContainer should be patched
  • Loading branch information
armenzg committed Jan 15, 2019
1 parent e170e8c commit 8aff0d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 28 deletions.
9 changes: 0 additions & 9 deletions src/components/app.jsx

This file was deleted.

28 changes: 9 additions & 19 deletions src/index.jsx
@@ -1,29 +1,19 @@
import Raven from 'raven-js';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { HashRouter } from 'react-router-dom';
import App from './components/app';
import Boundary from './components/errorBoundary';
import Routes from './components/routes';
import './style.css';

if (process.env.NODE_ENV === 'production') {
Raven.config('https://60b05bc4ef794a6c9e30e86e6a316083@sentry.io/300397').install();
}

const root = document.getElementById('root');
const load = () => render(
<AppContainer>
<HashRouter>
<Boundary>
<App />
</Boundary>
</HashRouter>
</AppContainer>,
root,
render(
<HashRouter>
<Boundary>
<Routes />
</Boundary>
</HashRouter>,
document.getElementById('root'),
);

// This is needed for Hot Module Replacement
if (module.hot) {
module.hot.accept('./components/app', load);
}

load();

0 comments on commit 8aff0d4

Please sign in to comment.