frontend/src/containers/RootContainer.js
import React from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import routes from '../routes';
const RootContainer = ({ store }) => {
const history = syncHistoryWithStore(browserHistory, store);
return (
<Provider {...{ store }}>
<Router path="/" {...{ history }} routes={routes} />
</Provider>
);
};
RootContainer.propTypes = {
store: PropTypes.shape({}).isRequired,
};
export default RootContainer;