List
Maps an array to nodes, and renders nothing when it is empty.
Usage
itemExtractor receives each row and its index, and returns what to render.
tsx
<List array={jobs} itemExtractor={({ row }) => <Job key={row.id} job={row} />} />Empty
An empty array renders nothing, so there is no length > 0 && around it. The row type comes from the array; readonly arrays work too.
Reference
| prop | type | default | |
|---|---|---|---|
array? | readonly T[] | [] | the source rows |
itemExtractor? | (({ row, index }) => ReactNode) | null | null | called per row |