4 ms·
I 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 co
by rootlocus 10y ago
I 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.