can this be done by. const [counts, setCounts] = useState(0);. useRef.current = counts;. setInterval(() => {. console.log(useRef.current);. }, 1000);.
確定! 回上一頁