PHP 7.4.33
Preview: useTransformRef.d.ts Size: 655 B
/var/www/cookieconsent.bitkit.dk/httpdocs/node_modules/use-callback-ref/dist/es5/useTransformRef.d.ts
import { ReactRef, RefObject } from './types';
/**
 * Create a _lense_ on Ref, making it possible to transform ref value
 * @param {ReactRef} ref
 * @param {Function} transformer. 👉 Ref would be __NOT updated__ on `transformer` update.
 * @returns {RefObject}
 *
 * @see https://github.com/theKashey/use-callback-ref#usetransformref-to-replace-reactuseimperativehandle
 * @example
 *
 * const ResizableWithRef = forwardRef((props, ref) =>
 *  <Resizable {...props} ref={useTransformRef(ref, i => i ? i.resizable : null)}/>
 * );
 */
export declare function useTransformRef<T, K>(ref: ReactRef<K>, transformer: (original: T | null) => K): RefObject<T>;

Directory Contents

Dirs: 0 × Files: 20
Name Size Perms Modified Actions
502 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
685 B lrw-r--r-- 2025-06-16 05:45:39
Edit Download
357 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
702 B lrw-r--r-- 2025-06-16 05:45:39
Edit Download
386 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
1.84 KB lrw-r--r-- 2025-06-16 05:45:39
Edit Download
645 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
892 B lrw-r--r-- 2025-06-16 05:45:39
Edit Download
714 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
1.41 KB lrw-r--r-- 2025-06-16 05:45:39
Edit Download
376 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
615 B lrw-r--r-- 2025-06-16 05:45:39
Edit Download
301 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
77 B lrw-r--r-- 2025-06-16 05:45:39
Edit Download
737 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
1.98 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
707 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
1.33 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
655 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
897 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).