Open ckinmind opened 7 years ago
I have the same problem, too。Have you solved it?
@JustinYi922 这个问题应该只在开发环境有,构建打包后应该就不会有这个警告了,我的参考资料中有解释:
The warning is there just to let you know that when you're using hash history, you can't actually PUSH the same path; the browser won't add anything to the history stack. But you should only get this warning in development. If you generate your production build correctly (using NODE_ENV=production) you shouldn't see this warning in production.
不好意思是我搞错了。我把pathName敲成path了。
发现使用新版本的路由的时候,点击同一个路由会有如下警告
参考资料:Warning: You cannot PUSH the same path using hash history