p5.js-web-editor/client/index.jsx
Cassie Tarakajian 8054a532d7
Update to webpack 4 (#1145)
* remove some of the react errors, start to fix webpack HMR errors

* start upgrade to webpack 4

* more stuff to update webpack

* update webpack configs to work with webpack 4

* remove linting from truncate script
2019-08-28 16:08:40 -04:00

30 lines
732 B
JavaScript

import React from 'react';
import { render } from 'react-dom';
import { hot } from 'react-hot-loader/root';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import configureStore from './store';
import routes from './routes';
require('./styles/main.scss');
// Load the p5 png logo, so that webpack will use it
require('./images/p5js-square-logo.png');
const history = browserHistory;
const initialState = window.__INITIAL_STATE__;
const store = configureStore(initialState);
const App = () => (
<Provider store={store}>
<Router history={history} routes={routes(store)} />
</Provider>
);
const HotApp = hot(App);
render(
<HotApp />,
document.getElementById('root')
);