Open reboottime opened 4 months ago
The footer is not a performance matter as it just sits in memory
React.cloneElement is a performance matter, way too fragile and magical on one or two params
Solution: https://react.dev/reference/react/cloneElement#alternatives
<List
items={products}
renderItem={(product, isHighlighted) =>
<Row
key={product.id}
title={product.title}
isHighlighted={isHighlighted}
/>
}
/>
Component as Props
This article is part of an advanced React series tutorials.
Trade off: Having flexibility but too flexible
Major Content