You might not need JavaScript classes

by | Sep 15, 2019 | Voxxed Days Cluj-Napoca 2019

Ramón Guijarro is a creative web developer with an interest in design, communication and data. He’s a JavaScript and React enthusiast who likes to share the little he knows as much as he can. He also likes to find out about unexpected uses for the web. Making up silly personal needs in order to solve them with equally silly code projects is another of his questionable virtues.

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’ve not only been argued an 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!