react-recycled-list
Version:
A React library for efficiently rendering large list with expensive component
28 lines (27 loc) • 1.05 kB
TypeScript
import React from 'react';
export interface ResponsiveContainerProps {
/**
* A function that is responsible for rendering the list based on the given height and width.
*
* The given height and width is the height and width of the parent element of ResponsiveContainer.
*/
render: (sizeInfo: {
width: number;
height: number;
}) => React.ReactNode;
/**
* If set true the list will adjust its height and width only when the user stops resizing.
*/
debounceResize?: boolean;
/**
* How many milisecond to wait after the the user stops resizing to triger the resizing (re-computation) of the list.
*/
debounceInterval?: number;
/**
* The initial rendered height of the list. Only used when server side rendering is required.
*
* This will determine how many rows are rendered on the server side.
*/
serverSideHeight?: number;
}
export default function ResponsiveContainer(props: ResponsiveContainerProps): JSX.Element;