3 ms·
>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 imagi
by hackerboos 13y ago
>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.
- chc 13y ago> 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.