Server-side React Rendering From non-Node Environmentsby@musawiralishah
5,975 reads
5,975 reads

Server-side React Rendering From non-Node Environments

by Musawir A. Shah3mMarch 22nd, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

If most of your front-end is built using <a href="https://hackernoon.com/tagged/react" target="_blank">React</a> components, it makes sense to use the same code to render your views from the backend. This <strong>pre-rendering</strong>, i.e. not waiting for your <a href="https://hackernoon.com/tagged/javascript" target="_blank">Javascript</a> to load in the web browser before components get rendered, is particularly important for SEO. Luckily, React provides functionality to render components into an HTML string, which can then be returned from the web server. However, React is a Javascript library, and therefore a Javascript runtime environment is required. If you’re using NodeJS for your backend, you’re good to go. But if you use Ruby on Rails, Go, Django, or any other non-Javascript environment, you won’t be able to use React’s server-side rendering functions directly.

Company Mentioned

Mention Thumbnail
featured image - Server-side React Rendering From non-Node Environments
Musawir A. Shah HackerNoon profile picture
Musawir A. Shah

Musawir A. Shah

@musawiralishah

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite