3 ms·
> Here, we're generating a new array of virtual <li> elements — each with their own inline event handler — on every state change, regardless of whether props.it
by smith-kyle 7y ago
> Here, we're generating a new array of virtual <li> elements — each with their own inline event handler — on every state change, regardless of whether props.items has changed. Unless you're unhealthily obsessed with performance, you're not going to optimise that.
React makes it pretty trivial to prevent rerenders when props have not changed