useEffect 的第二个参数为一个空数组,初始化调用一次之后不再执行,相当于componentDidMount。 function Demo () { useEffect(() => {
確定! 回上一頁