"use client"; import { useRef } from "react"; //#region src/utils/use-latest-ref.ts /** * Keep a ref that always points to the latest value. * * Useful for capturing callbacks or derived values inside closures * that are created once (e.g. factory callbacks) without stale reads. */ function useLatestRef(value) { const ref = useRef(value); ref.current = value; return ref; } //#endregion export { useLatestRef }; //# sourceMappingURL=use-latest-ref.js.map