Any way to convert client rendered site to SSR?

Hi,

I have a site build on React / Meteor (of course :slight_smile:
I see the problem with SEO and wonder about how difficult is it to convert client rendered site to SSR site?
Is it a big job to do? Is it possible? How? What to read/examples?

it really depends…

  • which router do you use?
  • do you use pub/sub or apollo/graphql?
  • how many routes do you have?

I use

  • react-router version 5
  • pub/sub
  • about 15 routes

:slight_smile:

with react-router its kinda easy, you can start by reading some articles about ssr with react-router, like this: https://alligator.io/react/react-router-ssr/

but instead of express like in the link above, you use meteor’s server-render package: https://docs.meteor.com/packages/server-render.html

The tricky part is make it work seamless with pub/sub. For that, you can use https://github.com/abecks/meteor-fast-render

3 Likes

Thanks a lot for the links! I will study them.

I am quite new in SSR, so does it mean that I do not have to rewrite all the code, but just to implement server-render and meteor-fast-render?

I wonder if @abecks plans to update the documentation (it is a quite confusing mix of the old doc and the new one.)

This looks good otherwise, but I wonder how it might work with authenticated user subscriptions.
A working example would be very helpful as well :slight_smile:
Thanks for having done this so far

it should work with meteor 1.8.1 :thinking: