3 ms·
Glad to see people implementing similar projects in both frameworks so everyone can evaluate their needs. Though, comparing code snippets to a lengthy tutorial
by peterhunt 13y ago
Glad to see people implementing similar projects in both frameworks so everyone can evaluate their needs.
Though, comparing code snippets to a lengthy tutorial kind of misrepresents the verbosity of React. I think we forgot to put the completed tutorial on GitHub, so here it is for an easier comparison:
https://github.com/petehunt/react-tutorial/blob/master/scripts/example.js https://github.com/petehunt/react-tutorial/blob/master/scrip...
Outside of standard HTML boilerplate our entire application is pretty small I think.
- thejosh 13y agoThis is the entire point of TodoMVC[1], which is to create a standard project across multiple languages/frameworks. [1] http://todomvc.com/ http://todomvc.com/
- peterhunt 13y agoHere ya go: https://github.com/facebook/react/tree/master/examples/todomvc https://github.com/facebook/react/tree/master/examples/todom... We also have a demo of Backbone integration, too: https://github.com/facebook/react/tree/master/examples/todomvc-backbone https://github.com/facebook/react/tree/master/examples/todom...
- jonahx 13y agoThe difficulty is when the Todo MVC does not represent a framework's advantages. In the main react thread, peter's comments suggest that React shines in an environment with many, complex interacting UI components.
- ch0wn 13y agoThis is exactly why we're working on TasteApp[0] which is going to give frameworks a better chance to show of their strengths in medium-sized projects. [0] https://github.com/tastejs/tasteapp https://github.com/tastejs/tasteapp
- ojr 13y ago>Our entire application is pretty small I think Well, I think most would agree that AngularJS has better readability and is more concise but a disclaimer would be that I've been looking at Angular's syntax for quite some time and reactjs is a new framework...Instagram's website is nice by the way, simple, clean UI. The "Load More" Button on the site is probably powered by reactjs? @peterhunt
- peterhunt 13y agoThere's a decent amount in there. We have client-side URL routing/transitions (thanks, Backbone) and the entire profile and feed pages are just big React components. There are also photo modals, login modals, and a full layer/tooltip system which is non-trivial to get right.
- robocat 13y agoFrom beginning of tutorial: > For our comment box example, we'll have the following component structure: >- CommentBox > - CommentList > - Comment > - CommentForm Yet the AngularJS solution simplifies this down to one component. If we presume React could simplify down to a single component too, then the AngularJS solution is would only be fair if it keeps the artificial constraint of having four component classes.