Live data from Hacker News

Facebook’s New React JavaScript Library Tutorial Rewritten in AngularJS

medium.com

51–56 of 56 posts

Re: Facebook’s New React JavaScript Library Tutorial Rewritten in AngularJS

#51
post #33

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 app…

> 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

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 Rewritten in AngularJS

#52

If anything, this post shows that Medium needs a good way to display code snippets–having to resort to screenshots is pretty gross.

Screenshots work universally across language settings, so I think they're very appropriate.

It's text... frozen in an image, to where it can't be copied/pasted except via OCR. Seems bad

Re: Facebook’s New React JavaScript Library Tutorial Rewritten in AngularJS

#53
post #52

Earlier quoted context omitted.

Screenshots work universally across language settings, so I think they're very appropriate.

It's text... frozen in an image, to where it can't be copied/pasted except via OCR. Seems bad

It's a small amount of text, and IMHO, coping / pasting code from the web is hardly ever a good idea.

Re: Facebook’s New React JavaScript Library Tutorial Rewritten in AngularJS

#54
post #38
post #18

Earlier quoted context omitted.

This is the entire point of TodoMVC[1], which is to create a standard project across multiple languages/frameworks. [1] http://todomvc.com/

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.

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 Rewritten in AngularJS

#55
post #31

Earlier quoted context omitted.

O'Reily has a book out on AngularJS that's a succinct read: http://shop.oreilly.com/product/0636920028055.do

I can't quite recommend that book. A lot of the code examples contain errors and, worse, some of them are subtle errors in nomenclature (the text refers to the "myService" service but the code declares it as "service" in one place and then "myService" in another) and not jsut typos. And yes, that was intentional.

That's probably a fair assessment. I don't really read books like this for the code precision (heck even sample repos on github don't survive working over much time). I look more at the high-level gist of concepts, so for that it's good, and then I know what to Google next...

I wouldn't even be surprised if the book is totally out of date in a few months.

Re: Facebook’s New React JavaScript Library Tutorial Rewritten in AngularJS

#56
post #52

Earlier quoted context omitted.

It's text... frozen in an image, to where it can't be copied/pasted except via OCR. Seems bad

It's a small amount of text, and IMHO, coping / pasting code from the web is hardly ever a good idea.

What if want to test or rewrite that code? I just tried to do that, don't think that's unusual at all in programming-related articles.
Post reply on HN