Four Ways to Build Universal React Applications

November 02, 2016 0 Comments universal, react, by

The most widely used search engines will crawl JavaScript applications. It may not happen as often and it may take a little bit longer, but the future is looking bright. There are some search engines that won't. Render your intial view on the server has other advantages, an can sometimes improve the time-to-first-paint of your application. A lot of times we are rendering initial views on the server and subsequent views in the UI.

Electrode

Walmart has open-sourced a solution optimizing above-the-fold views and server-side caching.

Next.js

Zeit uses getInitialProps in the React lifecycle, to trigger rendering on the server and subsequent rendering in the client.

React Server

Redfin has a well-documented solution and Yeoman generator for getting started with https://react-server.io.

Simple

Of course, you can just roll your own solution. This example demonstrates just using a catch-all route in express, and using your ReactRouter configuration.

Code Repositories

Here's a list of universal JavaScript projects to check out


Tag cloud