* Upgrade to React Router v4 * Fix pages not change when the URL was changed. This issue is due to the Redux `connect` wrapper around `<App/>`. `connect` diffs changes in regular props to know when to update the component, but doesn't check context props like `location`. See https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/guides/blocked-updates.md. * Update to new `history` methods.
23 lines
580 B
JavaScript
23 lines
580 B
JavaScript
import React from 'react';
|
|
import { Provider } from 'react-redux';
|
|
import { Route } from 'react-router-dom';
|
|
import { ConnectedRouter } from 'react-router-redux';
|
|
import history from './routing/history';
|
|
import configureStore from './redux/configureStore';
|
|
import { setStore } from './valueObjects/AssetProxy';
|
|
import App from './containers/App';
|
|
|
|
const store = configureStore();
|
|
|
|
setStore(store);
|
|
|
|
const Root = () => (
|
|
<Provider store={store}>
|
|
<ConnectedRouter history={history}>
|
|
<Route component={App}/>
|
|
</ConnectedRouter>
|
|
</Provider>
|
|
);
|
|
|
|
export default Root;
|