我在我的webapp中有react-redux和react-router,而我试图在保持redux状态的同时更改路由。我尝试了所有这些,它们都删除了redux状态:
props.history.push({ pathname: `/my-path`}); // did this using withRouter and我怎样才能保持<
我正在使用create-react-app和react-redux和react-router。然后,它在props.products中搜索id以获取特定的产品属性。<SingleProduct />连接到redux商店的方式如下: function mapStateToProps(state){products: state.product