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