The entire .Net framework is OOP as is Java. None of those failed.
This is just a Javascript centric OOP Flame article. Problem is even Javascript supports OOP now.
NPM has messy Javascript code everywhere. It's a virtual garbage dump brought about by what Javascript allows and what people think are best practices.
Component Specifications: "When creating a component class by invoking React.createClass(), you should provide a specification object that contains a render method and can optionally contain other lifecycle methods described here."
Clearly the React team wasn't immune to fashion influences as that factory function would have been more appropriately called React.createComponent() especially as for all intents and purposes the component instance's this.props and this.state were owned and managed by React - not the object instance itself as one would expect with standard class-based object orientation.
This style was advocated by Douglas Crockford as class-free object orientation at least as far back as 2008 (JavaScript the Good Parts).
The component specification simply contained what was unique about that particular component.
It was the later alignment with the ES2015 class template for creating objects that brought in extends React.Component.
Graduated in Digital Media M.Sc. now developing the next generation of educational software. Since a while I develop full stack in Javascript using Meteor. Love fitness and Muay Thai after work.
Which I even prefer over class based oop just to feel great by attaching my standalone function to a class' proto to stay dry but don't mess with inheritance.
And npm itself has no influence on Js as a language. Same issues can happen in other language registries too.
Then why did even React use inheritance?
The entire .Net framework is OOP as is Java. None of those failed.
This is just a Javascript centric OOP Flame article. Problem is even Javascript supports OOP now.
NPM has messy Javascript code everywhere. It's a virtual garbage dump brought about by what Javascript allows and what people think are best practices.
It didn't
React.createClass()
: "Create a component given a specification."Component Specifications: "When creating a component class by invoking
React.createClass()
, you should provide a specification object that contains a render method and can optionally contain other lifecycle methods described here."Clearly the React team wasn't immune to fashion influences as that factory function would have been more appropriately called
React.createComponent()
especially as for all intents and purposes the component instance'sthis.props
andthis.state
were owned and managed by React - not the object instance itself as one would expect with standard class-based object orientation.This style was advocated by Douglas Crockford as class-free object orientation at least as far back as 2008 (JavaScript the Good Parts).
The component specification simply contained what was unique about that particular component.
It was the later alignment with the ES2015
class
template for creating objects that brought inextends React.Component
.For years this was common dude or are you too new?
class Car extends React.Component {
render() {
return
Hi, I am a Car!
;}
}
JavaScript has always had OOP, as long back as to the 1990s. It just didn't have class based OOP, but rather prototype OOP.
It's prototype OOP was sucky, still is.
All OOP is bad, but the ability to dynamically attach functions to an object has its use cases.
True. All OOP Is not bad, just your opinion
Which I even prefer over class based oop just to feel great by attaching my standalone function to a class' proto to stay dry but don't mess with inheritance.
And npm itself has no influence on Js as a language. Same issues can happen in other language registries too.
Very good point about dynamic features yes ... :)