9 ms·
Like classes matter. JS doesn't even have them, not in ES6, not in ES7. It's all just sugar for prototypal inheritance, which has nothing to do with OOP. I don'
by skratlo 12y ago
Like classes matter. JS doesn't even have them, not in ES6, not in ES7. It's all just sugar for prototypal inheritance, which has nothing to do with OOP. I don't see any future for OOP in JS land. They'd be better off investing time in reducing side-effects, and the enormous size the library sports.
- danabramov 12y agoThey're not investing in OOP in any way. In fact, they're doing the opposite: deprecating proprietary pseudo-OOP `React.createClass` helper and let people use whatever they fancy. This makes it easier to write React components using idiomatic constructs from different languages, whether it is TypeScript, ClojureScript, CoffeeScript, or whatever. Also lets you use any mixin system, if you need it at all. React's stance on inheritance: https://github.com/facebook/react/issues/613#issuecomment-29280175 https://github.com/facebook/react/issues/613#issuecomment-29... “Minimal API surface area”: http://www.youtube.com/watch?v=4anAwXYqLG8 http://www.youtube.com/watch?v=4anAwXYqLG8
- sebmarkbage 12y agoThis is actually a way to eventually reduce the size of the library since it makes the class system optional. We're definitely considering optional module based systems instead of OOP, but it's still too early. https://github.com/reactjs/react-future/tree/master/07%20-%20Returning%20State https://github.com/reactjs/react-future/tree/master/07%20-%2...