Earlier quoted context omitted.
Various companies (in one famous case, Twitter) have found that server rendering beats client rendering for initial rendering speed. React is designed so that if you care about server rendering, you can have the best of both worlds -- using Node you can render a component to HTML on the server, then pick it up the prepopulated DOM in client-side JS once your page loads. Since the server sends down plain HTML, search…
Exactly this. Serving fully formed html and picking it up by a client-side framework is great for crawlers and also great for performance. In addition to React, you should check out Rendr ( https://github.com/airbnb/rendr ) - it's a really cool library for doing this via server-side rendering of Backbone views.
React: Finally, a great server/client web stack
31–40 of 134 posts
Re: React: Finally, a great server/client web stack
#32When I start an app, I do not think from the bottom up, which is the react way. I want to start with the login page and redirects, or get the major page transitions down. I'll be interested in seeing how you approach that.
Re: React: Finally, a great server/client web stack
#33> You can choose to use this, but after getting over my initial distaste for it ("Ack! Who got markup in my code!"), I could never go back to not using it. Or you could just use HTMLbars/Handlebars. Seems like "JSX" is just a more complicated version of a Mustache-esque logic-less template.
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.
Re: React: Finally, a great server/client web stack
#34Am 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…
Re: React: Finally, a great server/client web stack
#35[deleted]
Re: React: Finally, a great server/client web stack
#36I come from an Ember.js background and its router / nested layout management is the best I have used. I like react, and have been diving into OM as well in my free time, but I'm not sure of the best way to approach routing / page transitions. When I start an app, I do not think from the bottom up, which is the react way. I want to start with the login page and redirects, or get the major page transitions down. I'll b…
Re: React: Finally, a great server/client web stack
#37Am 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…
Re: React: Finally, a great server/client web stack
#38Am 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…
Re: React: Finally, a great server/client web stack
#39Earlier quoted context omitted.
JSX isn't markup - it's XML which translates to Reacts internal representation which looks something like: bar --> React.DOM.div({ className: 'foo', children: 'bar' }) You don't have to use it - it's a convenience provided for designers (and arguably developers who have realised that templating provides a false separation of concerns). Om notably ( https://github.com/swannodette/om ) ignores it.
"JSX isn't markup - it's [Extensible Markup Language]"?
Re: React: Finally, a great server/client web stack
#40Am 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…