摘要: 场景: 用户点击浏览器刷新按钮时,清除state缓存 思路: 通过 监听 beforeunload 事件 方案: React.useEffect(() => { // 初始化 const handleInit = () => { history.replace({...history.locatio 阅读全文
posted @ 2022-08-11 23:57 每天都要进步一点点 阅读(339) 评论(0) 推荐(0)