import * as React from 'react'; /** * React.use if available (React 19+), undefined otherwise. * Use dynamic lookup to avoid Webpack compilation errors with React 18. */ export declare const reactUse: ((usable: Promise | React.Context) => T) | undefined; export declare function useStableCallback) => any>(fn: T): T; export declare const useLayoutEffect: typeof React.useEffect; /** * Taken from https://www.developerway.com/posts/implementing-advanced-use-previous-hook#part3 */ export declare function usePrevious(value: T): T | null; /** * React hook to wrap `IntersectionObserver`. * * This hook will create an `IntersectionObserver` and observe the ref passed to it. * * When the intersection changes, the callback will be called with the `IntersectionObserverEntry`. * * @param ref - The ref to observe * @param callback - The callback to call when the intersection changes * @param disabled - Whether observation is disabled * @returns The IntersectionObserver instance * @example * ```tsx * const MyComponent = () => { * const ref = React.useRef(null) * useIntersectionObserver( * ref, * (entry) => { doSomething(entry) }, * false * ) * return
* ``` */ export declare function useIntersectionObserver(ref: React.RefObject, callback: (entry?: IntersectionObserverEntry) => void, disabled?: boolean): void; /** * React hook to take a `React.ForwardedRef` and returns a `ref` that can be used on a DOM element. * * @param ref - The forwarded ref * @returns The inner ref returned by `useRef` * @example * ```tsx * const MyComponent = React.forwardRef((props, ref) => { * const innerRef = useForwardedRef(ref) * return
* }) * ``` */ export declare function useForwardedRef(ref?: React.ForwardedRef): React.RefObject;