class Item extends React.PureComponent {
render() {
const { name, color } = this.props
return (
<li>
<b>{name} ({color})</b>
</li>
)
}
}
class ItemsList extends React.PureComponent {
render() {
const { items } = this.props
return (
<ul>
{items.map(item => (
<Item key={item.id} {...item} />
)}
</ul>
)
}
}