去掉严格模式,会影响useEffect的执行时机。
<React.StrictMode>
</App>
</React.StrictMode>
jsx中{ } 不可以使用if语句,switch case 语句声明语句,不是表达式,不能出现在{}中。
react中使用map来渲染表达式
function App(){
去掉严格模式,会影响useEffect的执行时机。
<React.StrictMode>
</App>
</React.StrictMode>
jsx中{ } 不可以使用if语句,switch case 语句声明语句,不是表达式,不能出现在{}中。
react中使用map来渲染表达式
function App(){