通过ref 来手动获取上一轮props或者state的值:function Counter() { const [count, setCount] = useState(0); const prevCountRef = useRef(); ...
確定! 回上一頁