Size
0.15 kb
useLatestRef
Transform anything into a ref. The ref is always up to date in effects and DOM events.
Installation
Usage
Transform any value into a ref:
Use ref.current to read the latest value in effects, changes to value do not trigger the effect.