将定时器函数提取出来,每次定时器触发时,都能取到最新到 count . function Counter() { let [count, setCount] = useState(0); const myRef = useRef( ...
確定! 回上一頁