Bereaksi fungsi panggilan balik asli menggunakan nilai status default
...
const [details, setDetails] = useState({})
const stateRef = useRef(details)
stateRef.current = details
const callbackFn = () => {
const currentDetails = stateRef.current
}
florinrelea