Live data from Hacker News

React: Finally, a great server/client web stack

eflorenzano.com

51–60 of 134 posts

Re: React: Finally, a great server/client web stack

#51

Am I the only one that kind of thinks most websites should just be static pages? Like, I get pretty irritated when I go to read a blog post on Medium or wherever and it loads a header and a blank page, and then loads a bunch of javascript (mostly tracking and analytics frameworks), and finally goes out and gets the actual content. And then if I scroll down, it has to load some more garbage from Disqus or something. P…

I agree. Static pages (with proper markup semantics) are automatically optimized for all browsers.

I know this may sounds sarcastic, but I am totally serious.

Re: React: Finally, a great server/client web stack

#53
post #33

Earlier quoted context omitted.

Most of React's novelty, I think, comes from the Virtual DOM. Your view spits out a DOM tree using the React.DOM.* objects. The JSX allows you generate the appropriate calls to those constructors by writing something that more resembles HTML. You can't just use Handlebars, etc.

It's not exactly novel. Opa ( http://opalang.org ) has been doing this for a few years...

Opa should be more popular.

Re: React: Finally, a great server/client web stack

#54
post #33

Earlier quoted context omitted.

Most of React's novelty, I think, comes from the Virtual DOM. Your view spits out a DOM tree using the React.DOM.* objects. The JSX allows you generate the appropriate calls to those constructors by writing something that more resembles HTML. You can't just use Handlebars, etc.

It's not exactly novel. Opa ( http://opalang.org ) has been doing this for a few years...

If only opa were released under a license that let normal people feel safe about experimenting with it/reading its source :(.

Re: React: Finally, a great server/client web stack

#56

Am I the only one that kind of thinks most websites should just be static pages? Like, I get pretty irritated when I go to read a blog post on Medium or wherever and it loads a header and a blank page, and then loads a bunch of javascript (mostly tracking and analytics frameworks), and finally goes out and gets the actual content. And then if I scroll down, it has to load some more garbage from Disqus or something. P…

I agree. Static pages (with proper markup semantics) are automatically optimized for all browsers. I know this may sounds sarcastic, but I am totally serious.

But not for all use cases. A completely blank static document will have the best possible performance characteristics, but the lowest possible utility. Writing needlessly slow things is stupid, but the blind pursuit of performance is missing the point.

Re: React: Finally, a great server/client web stack

#57
post #47
post #45

Can anybody explain to me how to use react.js without their "guard" feature. I need my app to throw the error natively and not wrapped by the framework. Thanks ( http://stackoverflow.com/questions/21040538/how-to-disable-t... )

Can you be more specific with the problem you're seeing? An example jsfiddle/jsbin would help. If you're referring to the fact that React sometimes catches and rethrows exceptions making it harder to debug, that's something I'm planning to try to fix soon. In the meantime you can use the blue stop sign in Chrome's Sources panel to catch the error as soon as it's thrown.

yes, that's the problem.. I don't like too much the blue because hangs all the time on jquery on page refresh...

Re: React: Finally, a great server/client web stack

#58

Am I the only one that kind of thinks most websites should just be static pages? Like, I get pretty irritated when I go to read a blog post on Medium or wherever and it loads a header and a blank page, and then loads a bunch of javascript (mostly tracking and analytics frameworks), and finally goes out and gets the actual content. And then if I scroll down, it has to load some more garbage from Disqus or something. P…

So, you read an article about how easy server-side rendering is with React, and your first impulse is to rant about client-side rendering? Did you not read the post or did you just feel an overwhelming urge to posture?

Re: React: Finally, a great server/client web stack

#59

Am I the only one that kind of thinks most websites should just be static pages? Like, I get pretty irritated when I go to read a blog post on Medium or wherever and it loads a header and a blank page, and then loads a bunch of javascript (mostly tracking and analytics frameworks), and finally goes out and gets the actual content. And then if I scroll down, it has to load some more garbage from Disqus or something. P…

For content sites, you are correct. But what about an in browser app, like Trello. Obviously in those cases javascript significantly improves the experience. So its just a case by case scenario. But I agree with the general point you are trying to make, and I work as a front-end dev who builds a lot of js heavy web pages/apps for a living.

Re: React: Finally, a great server/client web stack

#60

Am I the only one that kind of thinks most websites should just be static pages? Like, I get pretty irritated when I go to read a blog post on Medium or wherever and it loads a header and a blank page, and then loads a bunch of javascript (mostly tracking and analytics frameworks), and finally goes out and gets the actual content. And then if I scroll down, it has to load some more garbage from Disqus or something. P…

Not all use cases are equal. Static pages might work great for static content, but what about something like GitHub? Wouldn't it be nice to see the issues list refresh live when somebody else closes one?

> Wouldn't it be nice to see the issues list refresh live when somebody else closes one?

Maybe a tiny bit. I guess. Really, I'd just reload the page if I wanted to see recent changes.

Post reply on HN