From 8aff0d4b03e952a758d638854812242b9d1c7613 Mon Sep 17 00:00:00 2001 From: Armen Zambrano G Date: Tue, 15 Jan 2019 11:20:16 -0500 Subject: [PATCH] Fix development set up issue There was an issue when developing locally where the console would show this error: > Error: React-Hot-Loader: AppContainer should be patched --- src/components/app.jsx | 9 --------- src/index.jsx | 28 +++++++++------------------- 2 files changed, 9 insertions(+), 28 deletions(-) delete mode 100644 src/components/app.jsx diff --git a/src/components/app.jsx b/src/components/app.jsx deleted file mode 100644 index 04c546c4..00000000 --- a/src/components/app.jsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -import Routes from './routes'; -import '../style.css'; - -// Main component -export default () => ( - -); diff --git a/src/index.jsx b/src/index.jsx index 35c21bd2..6d2a2025 100644 --- a/src/index.jsx +++ b/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( - - - - - - - , - root, +render( + + + + + , + document.getElementById('root'), ); - -// This is needed for Hot Module Replacement -if (module.hot) { - module.hot.accept('./components/app', load); -} - -load();