I tried and can achieve the same without useRef as below: function Timer() { const interval = null; useEffect(() => { const id = setInterval(() => { // .
確定! 回上一頁