errortypeerror专题

next.js开发中页面回退时报Unhandled Runtime ErrorTypeError destroy is not a function

Next.js开发中页面回退时报Unhandled Runtime Error:TypeError: destroy is not a function 问题描述 在Next.js开发中,从A页面跳转到B页面,再使用浏览器回退到A页面时报上述错误: 错误原因 是因为在B页面里,在使用useEffect时,错误地定义了异步函数: useEffect( async () => {