News for hackers. Stuff that matters.
Re:React: Finally, a great server/client web stack by hackerboos on Friday January 24, 2014 @02:59PM (#7117525)
>So, you read an article about how easy server-side rendering is with React

The article just says it's easy. It doesn't provide any concrete examples.

I imagine it would be easy in Node to do this but what about Ruby, Python etc.

Re:React: Finally, a great server/client web stack by chc on Friday January 24, 2014 @03:26PM (#7117727)
> The article just says it's easy. It doesn't provide any concrete examples.

It doesn't provide code, but it points out that you can render to a string. It is literally that easy — you can just call React.renderComponentToString instead of React.renderComponent, though in practice there are Node libraries that make this even easier.

> I imagine it would be easy in Node to do this but what about Ruby, Python etc.

Well, it's a JavaScript library. If you can run JavaScript, you can render React templates. For example, Instagram is a Django app that runs a Node subprocess to render templates.