p5.js-web-editor/client/index.jsx

27 lines
638 B
React
Raw Normal View History

import React from 'react';
import { render } from 'react-dom';
2018-05-03 00:34:03 +00:00
import { hot } from 'react-hot-loader';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import configureStore from './store';
import routes from './routes';
require('./styles/main.scss');
const history = browserHistory;
const initialState = window.__INITIAL_STATE__;
const store = configureStore(initialState);
2018-05-03 00:34:03 +00:00
const App = () => (
<Provider store={store}>
<Router history={history} routes={routes(store)} />
2018-05-03 00:34:03 +00:00
</Provider>
);
const HotApp = hot(module)(App);
render(
<HotApp />,
document.getElementById('root')
);