如何解决 react-router 跳转当前路由不刷新问题?

如,我当前的路由是/manage/user,现在我点击跳转操作:this.props.history.push('/manage/user'),页面没有变化,如何解决?

阅读 8.7k
3 个回答
Hash history cannot PUSH the same path; a new entry will not be added to the history stack

你的目的是什么?
刷新当前数据?

不然你想要啥变化...

如果数据要变化,你要请求新的值,比如user换了,你可以直接请求此用户的数据,然后页面重新渲染

推荐问题