Reagieren Sie die native Rückruffunktion verwendet den Standardzustandswert
...
const [details, setDetails] = useState({})
const stateRef = useRef(details)
stateRef.current = details
const callbackFn = () => {
const currentDetails = stateRef.current
}
florinrelea