Gershon Papi Gershon Papi - 5 months ago 50
Javascript Question

React Relay and server side rendering

I've been working on an isomorphic app built with react and I've read about using

Relay.js
and
GraphQL
for client-server interactions.

I've been wondering, is there any special set up or things to keep in mind when using
Relay.js
, when using react's server side rendering & isomorphic app development in particular?

Answer

React Relay currently has no "out of the box" solution for isomorphic application.
There's still a solution though:

  • isomorphic-relay: npm package with a very detailed documentation on how to integrate with it easily.

  • isomorphic-relay-router: npm package that adds server side rendering support to react-router-relay using isomorphic-relay.

For my understanding, adding server side rendering is in the works, but with no ETA.