React, Flux, GraphQL, Hack, HHVM...? All of this and more!
React can be rendered on in the Browsers DOM, but also on the server using ReactDOMServer, a library that emulates the DOM in the popular Node.js environment. This can be used to improve first load performance, but the process of rendering React is not simple compared to traditional string based templates.
Now there have been published some benchmarks detailing how much slower React.js Server Side Rendering (SSR) is compared to traditional templates. In the test it seems that compared to the Node.js Pug template library React SSR is over ten times slower:
In any case since React.js rendering is much slower in the tests compared to Pug, Nunjucks and ECMAScript Template Literals, by a considerable margin it is recommended in the article to use Cloudflare or a similar proxy cache service to lighten the load of your React SSR rendering servers or serverless functions:
However, for high load services where React is primarily used for rendering content feeds or similar non-dynamic content to HTML setting up traditional HTTP caching is advisable. While scaling rendering nodes horizontally is not complicated, but the fastest work is the work that need not be done.Tweet
-- The Performance Cost of Server Side Rendered React on Node.js