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

Function Example

src/routes/hooks/examples/ScrollingIndicator.tsx:13–28  ·  view source on GitHub ↗
({ contacts }: { contacts: Contact[] })

Source from the content-addressed store, hash-verified

11} from "react-window";
12
13function Example({ contacts }: { contacts: Contact[] }) {
14 const [list, setList] = useListCallbackRef(null);
15 const isScrolling = useIsScrolling(list?.element);
16
17 return (
18 <div className="h-full flex flex-col gap-2">
19 <List
20 listRef={setList}
21 rowComponent={RowComponent}
22 rowCount={contacts.length}
23 rowHeight={50}
24 rowProps={{ contacts, isScrolling }}
25 />
26 </div>
27 );
28}
29
30function RowComponent({
31 ariaAttributes,

Callers

nothing calls this directly

Calls 1

useIsScrollingFunction · 0.85

Tested by

no test coverage detected