Should I use React Server-Side Rendering?

June 18th, 2016

There is a lot of information on the web about how to use server-side rendering, or SSR, with React. But the question you'll want to answer first is: should I use it?

Server-side rendering is very cool, and a must-have in certain situations, but it comes with drawbacks.

Before you jump into server-side rendering, consider carefully:

Does server-side rendering make sense for my React app?

Here are three topics to consider when looking at server-side rendering:

  • SEO: Rendering server-side helps search engine crawlers find your content, but sometimes Google can find your content without SSR.
  • Performance: SSR will usually increase performance for your app, but not always.
  • Complexity: Using SSR will increase the complexity of your application, which means less time working on other features and improvements.

Wait, what is SSR?

Normally when using React, your browser will download a minimal HTML page, and the content will be filled in by JavaScript.

With SSR, the initial content is generated on the server, so your browser can download a page with HTML content already in place. Updates to the content are still handled in the browser.