static-cms/src/root.js

22 lines
532 B
JavaScript
Raw Normal View History

2016-09-13 17:08:26 +02:00
import React from 'react';
import { Provider } from 'react-redux';
import { Router } from 'react-router';
import routes from './routing/routes';
import history, { syncHistory } from './routing/history';
import configureStore from './store/configureStore';
const store = configureStore();
// Create an enhanced history that syncs navigation events with the store
syncHistory(store);
const Root = () => (
<Provider store={store}>
<Router history={history}>
{routes}
</Router>
</Provider>
2016-09-13 18:06:01 +02:00
);
2016-09-13 17:08:26 +02:00
2016-09-13 18:06:01 +02:00
export default Root;