createRef.d.ts 357 B

12345678910
  1. import { RefObject } from 'react';
  2. /**
  3. * creates a Ref object with on change callback
  4. * @param callback
  5. * @returns {RefObject}
  6. *
  7. * @see {@link useCallbackRef}
  8. * @see https://reactjs.org/docs/refs-and-the-dom.html#creating-refs
  9. */
  10. export declare function createCallbackRef<T>(callback: (newValue: T | null, lastValue: T | null) => any): RefObject<T>;