关于
- useEffect(() => {
-
- handlePostRequest();
- }, []);
执行2次问题. 这个在开发环境出现的时候,关闭下 next.config.js 中的
- /** @type {import('next').NextConfig} */
- const nextConfig = {
- reactStrictMode: false,
- }
-
- module.exports = nextConfig
reactStrictMode 设置为 false 就可以了.记得重新run dev