原因:业务要求需要 pushState 一次
探索:发现微信 pushState 两次,且两次带上不同的 hash,再回退,不会有刷新
解决办法:
1 2 3 |
componentDidMount(){ window.history.replaceState({fix: true}, '', '#fix') } |
具体问题描述看: 安卓微信 v7.0.4,触发 popState 网页会刷新
原因:业务要求需要 pushState 一次
探索:发现微信 pushState 两次,且两次带上不同的 hash,再回退,不会有刷新
解决办法:
1 2 3 |
componentDidMount(){ window.history.replaceState({fix: true}, '', '#fix') } |
具体问题描述看: 安卓微信 v7.0.4,触发 popState 网页会刷新