mapStateToProps not passing the ownProps from react-router
miftakribo opened this issue · 1 comments
miftakribo commented
i have a Dashboard container that connect to reducer, this is my connect configuration:
export default connect(
(state, ownProps) => ({
dashboardReducer: state.dashboardReducer,
headerReducer: state.headerReducer,
ownProps
}),
dispatch => bindActionCreators({
setGeneral,
addNewWidget
}, dispatch)
)(Dashboard);
when i console.log the this.props.ownProps on Dashboard container, it return {} which i expect it must return something like {routes:..., params:...}
miftakribo commented
sorry my bad, i found the error, it because i use react-code-splitting and forgot to passing props from that there