It really depends on what you mean by latest value, your code does store latest value to valueRef.current . const valueRef = useRef(); ...
確定! 回上一頁