useState:用于在函数组件中使用 state,可以通过调用 useState 方法来设置初始值,返回一个数组,包含当前的 state 值和一个更新 state 值的函数。
useEffect:用于在函数组件中使用生命周期,可以通过调用 useEffect 方法来实现 componentDidMount、componentDidUpdate 和 componentWillUnmount。
useContext:用于在函数组件中使用 context,可以通过调用 ...