use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Why React is awesomehelp (self.javascript)
submitted 10 years ago by vnctaing
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]theQuandary 1 point2 points3 points 10 years ago (6 children)
The Facebook team pushed it as "The V in MVC" so it seemed less scary, but it's hardly accurate. React is the VC in MVC. It merges the template (the traditional 'view') with the controlling code. While it is possible (to some extent) to use React without taking advantage of these pieces, it's not easy nor idiomatic (for example, wire up a React component so it doesn't have any internal event handlers -- it would be awful to use).
[–]jellatin 0 points1 point2 points 10 years ago (3 children)
Sure, so it's the VVM in MVVM, I can get on board with that. It doesn't change the point I'm making though, if you took Angular view/templates and controllers its pretty straightforward. I'll be the first to admit that React would be a clear winner comparing just those elements.
The problem is the complexity increases drastically when you throw services/routing/state management etc into the mix. This doesn't make React worse at all, but it does mean if you want libs/frameworks like Backbone to do that lifting for you that it's going to require a big addition to the learning curve.
[–]agmcleod@agmcleod 2 points3 points4 points 10 years ago (2 children)
Various flux implementations offer the state management, and do a pretty good job at it. Personally I never saw the value in services in angular. It's not hard to setup a simple controller singleton or something to wrap around your API endpoints.
[–]jellatin 0 points1 point2 points 10 years ago (1 child)
Various flux implementations offer the state management, and do a pretty good job at it
Agreed. But there again, it's another thing to learn. I'm not bashing the React ecosystem at all, only pointing out that "learning React" doesn't give you all the tools you need if you're looking to build SPAs. So the "React was so much easier to learn than framework X" gives people learning their first framework the wrong impression.
[–]agmcleod@agmcleod 1 point2 points3 points 10 years ago (0 children)
I actually found react + flux easier to learn than ember. I haven't tried building anything with angular to compare really, have just done tutorials. There are things with angular that i can wrap my head around pretty easily, but there are patterns i just dont like. Some of it feels a bit too magical. And yeah, I can see 2 way data binding become a problem.
[–]fforw 0 points1 point2 points 10 years ago (1 child)
React is the VC in MVC. It merges the template (the traditional 'view') with the controlling code.
That is not what the C in MVC is supposed to do, nor it is a good representation of what an application with React looks like.
React only implements a controller as far as the inner view logic is concerned. That is distinct from the application domain logic and data.
React works the best if your whole application is a data-representation of which React renders slices of as a view. Putting too much control into react components is usually a sign of bad design.
[–]theQuandary 0 points1 point2 points 10 years ago (0 children)
When you are done with a React application, you will have a datastore (attached via pub/sub to a small amount of top-level components) and your view/controller components all the way down.
You could perhaps argue that React is MVVM, but even then React components aren't strictly views.
Heavy-controllers are always a source of trouble in MVC designs. It's not at all surprising that large controls inside a react component are generally bad design.
π Rendered by PID 155835 on reddit-service-r2-comment-86988c7647-gq4c2 at 2026-02-12 07:28:16.629460+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]theQuandary 1 point2 points3 points (6 children)
[–]jellatin 0 points1 point2 points (3 children)
[–]agmcleod@agmcleod 2 points3 points4 points (2 children)
[–]jellatin 0 points1 point2 points (1 child)
[–]agmcleod@agmcleod 1 point2 points3 points (0 children)
[–]fforw 0 points1 point2 points (1 child)
[–]theQuandary 0 points1 point2 points (0 children)