News for hackers. Stuff that matters.
Re:Facebook’s New React JavaScript Library Tutorial Rewritte... by peterhunt on Thursday May 30, 2013 @01:00AM (#5791009)
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/scrip...

Outside of standard HTML boilerplate our entire application is pretty small I think.

Re:Facebook’s New React JavaScript Library Tutorial Rewritte... by thejosh on Thursday May 30, 2013 @01:58AM (#5791155)
This is the entire point of TodoMVC[1], which is to create a standard project across multiple languages/frameworks.

[1] http://todomvc.com/

Re:Facebook’s New React JavaScript Library Tutorial Rewritte... by peterhunt on Thursday May 30, 2013 @02:01AM (#5791163)
Re:Facebook’s New React JavaScript Library Tutorial Rewritte... by jonahx on Thursday May 30, 2013 @07:39AM (#5791897)
The 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.
Re:Facebook’s New React JavaScript Library Tutorial Rewritte... by ch0wn on Friday May 31, 2013 @01:42PM (#5800037)
This 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

Re:Facebook’s New React JavaScript Library Tutorial Rewritte... by ojr on Thursday May 30, 2013 @07:09AM (#5791796)
>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

Re:Facebook’s New React JavaScript Library Tutorial Rewritte... by robocat on Thursday May 30, 2013 @01:49PM (#5794000)
From 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.

Re:Facebook’s New React JavaScript Library Tutorial Rewritte... by peterhunt on Thursday May 30, 2013 @07:27AM (#5791852)
There'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.