- React
- You Gotta Love Frontend
- 2019 Lithuania
- You Might Not Need Classes
You Might Not Need Classes
Ramón Guijarro at You Gotta Love Frontend 2019 Lithuania
More than three years later, the introduction of classes to the ECMAScript standard is still a controversial topic. Brought over from popular classical object-oriented languages, they're not only an arguably unnecessary feature for JavaScript, but their usage can become actually harmful very easily. In this talk we'll take a look at the potential issues and pitfalls of using classes, like the need for context binding of methods, and suggest alternative patterns that are conceptually simpler, easier to work with, safer to use, more idiomatic, require less code and are actually more powerful. Come realize that all you really need in JavaScript are functions!