ReferenceUtils
useLatestRef
Hook that exposes the latest rendered value through a stable ref
Import
Usage
Use a latest-value ref when a long-lived callback must read current props without recreating the subscription that owns it.
The ref object is stable across renders and its current property is updated during every render.