advanced
Challenge: Build a Virtualized List Component
Implement this from the stub. Hidden tests grade the behaviour you write, not the comments you leave.
Challenge: Virtualized List
import { useState, useRef, useEffect, useCallback } from 'react';
interface VirtualizedListProps<T> {
items: T[];
itemHeight: number;
containerHeight: number;
overscan?: number;
renderItem: (item: T, index: number) => React.ReactNode;
onScroll?: (scrollTop: number) => void;
onReachEnd?: () => void;
reachEndThreshold?: number;
}
// Your implementation herechallenge — implement from scratchCtrl+↵ submits · Ctrl+Shift+↵ runsstarter code