Update client deps: react 16.3, babel 7

This commit is contained in:
Ken-Håvard Lieng 2018-04-05 21:13:32 +02:00
parent 1ae7d867a9
commit 0cbbc1b8ff
46 changed files with 1125 additions and 808 deletions

View file

@ -1,31 +1,20 @@
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import 'react-virtualized/styles.css';
import Root from 'components/Root';
import initRouter from 'util/router';
import Socket from 'util/Socket';
import initRouter from 'utils/router';
import Socket from 'utils/Socket';
import configureStore from './store';
import routes from './routes';
import runModules from './modules';
const host = DEV ? `${window.location.hostname}:1337` : window.location.host;
const production = process.env.NODE_ENV === 'production';
const host = production ? window.location.host : `${window.location.hostname}:1337`;
const socket = new Socket(host);
const store = configureStore(socket);
initRouter(routes, store);
runModules({ store, socket });
const renderRoot = () => render(
<AppContainer>
<Root store={store} />
</AppContainer>,
document.getElementById('root')
);
renderRoot();
if (module.hot) {
module.hot.accept('./components/Root', () => renderRoot());
}
render(<Root store={store} />, document.getElementById('root'));