Use Latest โ shadcn/ui Hook by mizzle | shadcnregistry
Use Latest
hook
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.