3 ms·
What's lost in all this is that classes are simple and understandable. Introducing all these new paradigms removes that simplicity. Everyone is ready to hate on
by nooyurrsdey 7y ago
What's lost in all this is that classes are simple and understandable. Introducing all these new paradigms removes that simplicity. Everyone is ready to hate on classes but they have been robust structures for a long time
- kiliancs 7y agoI think it's fair criticism to say that hooks are extraneous to JavaScript. However, they are still a better tool for the job of building components, and they solve real and important issues around safety, maintainability and complexity. There are alternatives to JS, and alternatives to React in JS. I think it's good the React team chose this unique direction to make the best framework possible by taking advantage of JS's strengths to workaround it's weaknesses.
- Unbeliever69 7y agoI think that what is lost is that Javascript is more of a functional language than an object-oriented one and a move to hooks embraces its functional roots while eliminating numerous footguns (this), simplifying reuse, and reducing redundancy.
- filleduchaos 7y agoI don't quite see how Javascript pre-ES5 was any more of a functional language than, say, Ruby at the time (a notoriously OO language). "It uses prototypes, not classes!" simply makes it a different kind of object-oriented.