virtua-restoration
Version:
<img src="./virtua-restoration.png" alt="Virtua Restoration" style="max-width: 1000px; width: 100%; display: block; margin: 0 auto 20px auto;">
30 lines (24 loc) • 927 B
TypeScript
import React from 'react';
import { CacheSnapshot } from 'virtua';
interface CacheProvider {
get: () => [number, CacheSnapshot] | undefined;
set: (data: [number, CacheSnapshot]) => void;
}
type CacheSource = 'sessionStorage' | 'localStorage' | 'custom';
interface Props$1 {
cacheKey: string;
children: React.ReactNode;
cacheSourceType?: CacheSource;
customProvider?: CacheProvider;
className?: string;
style?: React.CSSProperties;
}
declare const VirtualizedList: ({ cacheKey, children, cacheSourceType, customProvider, className, style }: Props$1) => React.JSX.Element;
interface Props {
cacheKey: string;
children: React.ReactNode;
cacheSourceType?: CacheSource;
customProvider?: CacheProvider;
}
declare const WindowVirtualizedList: ({ cacheKey, children, cacheSourceType, customProvider }: Props) => React.JSX.Element;
export { VirtualizedList, WindowVirtualizedList };