zepio/app/router/container.js

19 lines
412 B
JavaScript
Raw Normal View History

// @flow
2018-12-03 18:05:30 -08:00
import { compose } from 'redux';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import { RouterComponent } from './router';
import type { AppState } from '../types/app-state';
const mapStateToProps = (state: AppState) => ({
todos: state.todos,
});
2018-12-03 18:05:30 -08:00
export const Router = compose(
withRouter,
2018-12-03 11:27:56 -08:00
connect(
mapStateToProps,
null,
2018-12-03 18:05:30 -08:00
),
)(RouterComponent);