3 ms·
Out of curiosity, where do you stand on ES6 classes?
by balefrost 5y ago
Out of curiosity, where do you stand on ES6 classes?
- cphoover 5y agoCertainly cleaner than using the old prototypal inheritance syntax. // Dog Class function Dog(_name){ // call the parent constructor Animal.apply(this,arguments); } // extends the Animal prototype chain Dog.prototype = new Animal(); Although the new class syntax may obfuscate from what's actually happening in an effort to look more like traditional class-based languages like Java. However I'm the type of person that will only use React function components in my codebase. I don't think the object-oriented style has added much too my programming, except the temptation to reach for an unnecessary abstraction.