A React helper hook for storing latest value in ref object (updated in useEffect's callback).
React hook which returns the latest callback without changing the reference
React hook to track previous value
A React hook that updates useRef().current with the most recent value each invocation