4 ms·
To summarize: > React, Bad; Web Components, Good And that's literally all the justification the author is going to give you. "I _could_ tell you why React is
by thatswrong0 10y ago
To summarize:
> React, Bad; Web Components, Good
And that's literally all the justification the author is going to give you. "I _could_ tell you why React is designed poorly, but I won't. Instead, I'll complain about the fact that it's made by a COMPANY. A company that MAKES MONEY. And that's BAD for everyone".
Yeesh. React makes web development way more enjoyable and maintainable to me. Don't tell me THAT web components are better, tell me WHY. Tell me HOW React, which is functional in nature and makes composition and reasoning about view code incredibly easy, is making my app an "unmaintainable hair ball of unreadable code". The author conveniently leaves out actual argumentation.. for the entire article.
- rootlocus 10y agoI agree with you, I would've loved to see some more arguments, but to play the devil's advocate, he did offer some reasons against react: JSX wants you to couple your view with the model and controller I could give you a lot of specifics—separation of concerns, coupling views with models, the focus on needless optimizations, the importance of supporting open standards—but I'm going to tell you a story, instead. Ok, I agree, he didn't give any reason aside from separation of concerns and company bad, web components good.
- homogeneous 10y agoThis seems untrue in my experience. How is the view in any way coupled to the model since the "model" is simply a plain object passed down from a parent component? How could it be any more decoupled? I'm not even sure what a "controller" is in the context of react, but nothing about react or JSX forces you to couple your logic to the render function, in fact, a react "stateless" component is literally a pure function without any knowledge of state or the wider application.
- griffinmichl 10y agoReact breaks away from the traditional MVC model. MVC may work great on the server, but I just don't think MVC fits with modern UIs. Component-based architecture is far more powerful and scalable
- ng12 10y agoIf you use react/redux that's a totally incorrect assertion. Views are all dumb and ideally stateless, the model (store) and controller (actions) are completely pluggable at a high level.
- WalterSear 10y agoBasically arguing that a single concern should be split up into smaller, less manageable pieces. This is cargo coding.
- Zelphyr 10y agoWhile I agree that it would have been nice had he given examples of why React is bad and/or Web Components are better, I don't see anywhere in the post where he suggests React is bad simply because its developed by a for-profit corporation. His argument in that respect is that Facebook has a financial incentive to strengthen their walled garden and, to that end, they promote a custom implementation over web standards. And that is bad for everyone. There is a more recent post (https://www.pandastrike.com/posts/20160331-facebook-react-party-gone-wrong-socratic-dialog https://www.pandastrike.com/posts/20160331-facebook-react-pa... - thanks to @suyash for pointing that out!) that clarifies this point and even offers some counter-points to the argument. It doesn't touch on the technical merits of Web Components over React which I would like to see but I have to agree with their overall feeling on the matter.