react 18 dev环境严格模式下首屏 useEffect会执行两次
不用严格模式
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './app';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
//<Recat.strictMode>
<App/>
//</Recat.strictMode>
)