UNPKG

@nguyentc21/react-native-tooltip

Version:
11 lines 393 B
import { useRef, useCallback } from 'react'; function useStableCallback(fn) { const ref = useRef(fn); ref.current = fn; return useCallback((...args) => { var _ref$current; return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.call(ref, ...args); }, []); } export default useStableCallback; //# sourceMappingURL=useStableCallback.js.map