import { useRef, useCallback } from 'react';

"use strict";
function useLatestFunction(thing) {
  const latestFunctionRef = useRef(thing);
  latestFunctionRef.current = thing;
  return useCallback(
    (...args) => latestFunctionRef.current(...args),
    []
  );
}

export { useLatestFunction };
//# sourceMappingURL=useLatestFunction.mjs.map
