MCPcopy Create free account
hub / github.com/bvaughn/react-window / DynamicList

Function DynamicList

lib/hydration.test.tsx:51–77  ·  view source on GitHub ↗
({
  children,
  initialRowHeights,
  rowComponent = RowComponent
}: {
  children?: ReactNode;
  initialRowHeights?: number[];
  rowComponent?: (props: RowComponentProps) => ReactElement | null;
})

Source from the content-addressed store, hash-verified

49}
50
51function DynamicList({
52 children,
53 initialRowHeights,
54 rowComponent = RowComponent
55}: {
56 children?: ReactNode;
57 initialRowHeights?: number[];
58 rowComponent?: (props: RowComponentProps) => ReactElement | null;
59}) {
60 const rowHeight = useDynamicRowHeight({
61 defaultRowHeight: 25,
62 initialRowHeights
63 });
64
65 return (
66 <List
67 defaultHeight={100}
68 overscanCount={0}
69 rowComponent={rowComponent}
70 rowCount={100}
71 rowHeight={rowHeight}
72 rowProps={EMPTY_OBJECT}
73 >
74 {children}
75 </List>
76 );
77}
78
79// Resolves after requestAnimationFrame callbacks scheduled before this call,
80// including callbacks they schedule (nested up to `count - 1` levels deep)

Callers

nothing calls this directly

Calls 1

useDynamicRowHeightFunction · 0.90

Tested by

no test coverage detected