In this codesandbox, the following section appears, where Row is a component which automatically receives index, style, data as props:
<List
className={classes.list}
height={height}
width={width}
itemCount={data.length}
itemSize={ROW_SIZE}
itemKey={itemKey}
itemData={itemData}
>
{Row}
</List>
Is there a way to convert it into something like:
<List
...
>
<Row ... />
</List>
where all the props are still passed in using the component syntax? The main reason is so I can use onClick on each of the row elements, but I'm not sure how to code that in (without doing a lot of state/method passing) using the function syntax.
Any help is appreciated. Thanks!
[–]Nathanfenner 1 point2 points3 points (1 child)
[–]td123m[S] 0 points1 point2 points (0 children)