3 ms·
I see many developers stressing immensely over optimizations that amount to rounding errors. if (list[i].type === SomeType && list[i].valid) Refactored to
by ht85 7y ago
I see many developers stressing immensely over optimizations that amount to rounding errors.
if (list[i].type === SomeType && list[i].valid)
Refactored to avoid two array accesses:
item = list[i]
if (item.type == SomeType && item.valid)
Then a few months later, somebody refactors the second version to the first version, to avoid an assignment...
I wish people would simply relax and spend that time on more important things.
That said... the performance issue with arrow functions in React isn't related to creating those functions. It has more to do with those functions preventing proper memoization of the components that receive them as props.