Pure render checks
Case 1
The bad way
class Table extends PureComponent {
render() {
return (
<div>
{this.props.items.map(i =>
<Cell data={i} options={this.props.options || []}/>
)}
</div>
);
}
}The good way
Case 2
The bad way
Another bad way
The good way
The bad way
The good way
Related links:
Last updated