lazylist-react
Version:
list lazy loading of react
34 lines (33 loc) • 1.07 kB
TypeScript
/// <reference types="react" />
export interface CommonProps {
warpTag?: string;
className?: string;
tag?: string;
renderCount?: number;
threshold?: number;
root?: null | HTMLElement;
equalityCheckLimit?: number;
}
export interface Props extends CommonProps {
children: React.ReactNode[] | any;
renderCallback?: (containerInfo: IntersectionObserverEntryFace, containerVdom?: ReactDom, index?: number) => void;
}
export interface ReactDom extends React.ReactElement {
ref?: React.RefObject<any>;
}
export interface IntersectionObserverEntryFace {
time: number;
rootBounds: ClientRect;
boundingClientRect: ClientRect;
intersectionRect: ClientRect;
intersectionRatio: number;
target: HTMLElement;
isIntersecting: boolean;
}
export interface IntersectionObserverCase {
disconnect: () => void;
observe: (arg0: HTMLElement) => void;
takeRecords: () => any[];
unobserve: (arg0: HTMLElement) => void;
}
export declare type keyI = string | React.ReactText | number;