useEffect使用方法 useEffect 替代了原来的类组件生命周期,有三种使用方式,我们可以针对不同的业务使用useEffect; import React, { useEffect, useState} from "react"; import reactDom from "react-dom"; function Effect (){ const [count, setCount] = useState(0) // 1. 第一种使用方法:componentDidMount, componentDidUpdate