Update client dependencies
This commit is contained in:
parent
383ca39354
commit
d023f63a7c
9 changed files with 48 additions and 41 deletions
|
@ -1,7 +1,6 @@
|
|||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { syncReduxAndRouter } from 'redux-simple-router';
|
||||
import createBrowserHistory from 'history/lib/createBrowserHistory';
|
||||
import { browserHistory } from 'react-router';
|
||||
import configureStore from './store';
|
||||
import createRoutes from './routes';
|
||||
import Socket from './util/Socket';
|
||||
|
@ -9,14 +8,14 @@ import handleSocket from './socket';
|
|||
import Root from './containers/Root';
|
||||
|
||||
const host = __DEV__ ? `${window.location.hostname}:1337` : window.location.host;
|
||||
|
||||
const socket = new Socket(host);
|
||||
const store = configureStore(socket);
|
||||
handleSocket(socket, store);
|
||||
|
||||
const history = createBrowserHistory();
|
||||
syncReduxAndRouter(history, store);
|
||||
const store = configureStore(socket, browserHistory);
|
||||
handleSocket(socket, store);
|
||||
|
||||
const routes = createRoutes();
|
||||
|
||||
render(<Root store={store} routes={routes} history={history} />, document.getElementById('root'));
|
||||
render(
|
||||
<Root store={store} routes={routes} history={browserHistory} />,
|
||||
document.getElementById('root')
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue