UNPKG

react-img-toolkit

Version:

A lightweight React library for optimizing image loading through preloading, lazy loading, and caching capabilities

15 lines (14 loc) 365 B
interface UseLazyImageOptions { threshold?: number; rootMargin?: string; } export interface ILazyImageProps { src: string; options: UseLazyImageOptions; } export declare const useLazyImage: ({ src, options }: ILazyImageProps) => { isIntersecting: boolean; isLoaded: boolean; ref: import("react").RefObject<HTMLDivElement>; }; export {};