阵营路由器不会重新绘制路线容器查询参数更新后
问题描述:
在这里我有/products/mobile
路线阵营路由器不会重新绘制路线容器查询参数更新后
点击过滤器,我使用的反应 - 路由器终极版
这里它似乎react-router-redux发射位置改变动作,但它不重新呈现任何视图(页面保持不变,不用新的参数调用组件重新装入)。只是在浏览器中更新网址。
我使用this.props.router.push(/products/mobile?manufacturer=Apple)
进行路线的转变。
答
检查react router docs也许你应该尝试使用:
this.props.router.push({
pathname: '/products/mobile',
query: { manufactuerer: 'Apple' }
})
让我知道。
为什么当用户选择过滤器时,当您已经有能力执行操作时,您希望它重新呈现?您可以使用替换方法来更新位置 – abhirathore2006