Push()位置,更改地址栏中的URL但不呈现组件

时间:2017-05-07 17:50:07

标签: node.js reactjs express react-router react-router-redux

我将express用作nodeJs Web应用程序服务器,并将react-redux-router用于push新位置到浏览器。将地址栏中的地址从localhost:3000/admin更改为localhost:3000后,它会保持在同一页面上。

我使用dispatch(push('/'))来执行作业。

  

redux-logger:   enter image description here

[更新]

我使用了this solution,但它对我不起作用

1 个答案:

答案 0 :(得分:1)

使用withRouter包装组件解决了我的问题。

相关问题