Loading...
The useCurrentValue hook allows associating a value with current based on its parameter, equivalent to:
useCurrentValue
current
With the useCurrentValue hook
const ref = useRef(); ref.current = value;
useCurrentValue(value)