use-latest
A ref that always holds the newest value of a prop or callback, updated after each render. Lets an effect or a subscription call the latest callback without re-running whenever its identity changes.
use-latest
A ref that always holds the newest value of a prop or callback, updated after each render. Lets an effect or a subscription call the latest callback without re-running whenever its identity changes.