DEV Community

Discussion on: Traditional versus Arrow functions in JavaScript Classes

Collapse
 
taufik_nurrohman profile image
Taufik Nurrohman

FYI, the non-arrow function (the prototype style) is preferred because you don’t need to create those methods again and again on every instance, so it will be less in case of memory usage.

Reference: stackoverflow.com/q/310870/1163000

But, yeah. Just don’t over-optimize it.