React-Meteor SSR Discussion


#1

After looking at crater.io new design, I’m amazed and interested with SSR

Some good topic for discussion:

  1. Is it true that Server Side Rendering faster then Client Side Rendering (CSR)? Why?
  2. How you implement React SSR with Meteor? Via package or build yourself?
  3. If package, which package you use?
  4. What pros and cons of SSR compare to CSR?
  5. What pros and cons of SSR compare to Phantom based (Spiderable/Prerender)?

Thanks


#2

From @sashko


#3

Here’s how I understand the pros and cons:

SSR: Faster initial load time, but more complexity in your architecture and much more CPU load on the server.
CSR only: Longer initial load time, less load on the server, simpler to build the app.

I would say SSR is only worth it if your app relies on quick loads for conversion. For example, if you’re building Trello, I would say initial load doesn’t matter; for a forum like Crater where people are clicking links to it all the time, it matters a lot more.

Note that SSR has no relation to how fast the app is after the initial load.

Side note: Neither of these have an effect on SEO, it’s only about the performance aspect.


#4

I found package for routing. Looks promising.


#5

It actually has a great impact on SEO.

While google is mostly okay with rendering js, there are a lot of other crawlers, that are not. Besides, if you want to share your page on Twitter, Facebook, etc - they may not render you page card as well. There are also issues with services, that process your pages (like google adwords) which may not get data from your pages too.

We actually had a test with 40 pages during a month. Even google crawler with provided sitemap didn’t work well without ssr, while adding ssr made it happy almost instantly.

So, if you need your app to be shared and to be visible (google, twitter, etc) - you need ssr. If you don’t need that (for example for admin page or internal company app) - you probably don’t need ssr. It’s all about context.


#6

Have you tried prerender.io? I’m just saying that SSR is not the only, or easiest, way to get SEO. Prerender is built into galaxy btw.


#7

yep, prerender is a good and easy alternative.

However, I think is fits better libraries that can’t provide an ssr option (react is even absent from their list of libraries on front page). It can easily be a great choice for a Blaze app for example.

As for react, there is a ssr built-in functionality so it can be used instead. There are a lot of tutorials and examples on how to do this. And as for the cpu usage - you can cache the requests to make ssr functionality really cheap.

So, my point is if your app is public - it’s better to have ssr (or use prerender or smth similar).


#8

Even with prerender Ad word scores get dinged by page load performance. If you’re doing any SEM for your product you def need to reduce page load significantly.

SSR is probably the best way and only option available to us now. You Can’t help but ship your whole app on every page in meteor land now.


#9

Yeah I read that Google able to crawl javascript based web app. But their algorithm still suck and push me to implement Spiderable. After implementing Spiderable, indexing and ranking starting nicer


#10

Hi
I have a meteor app with flowrouter-ssr and react which was working (so far) to generate ssr until I updated meteor to latest release 1.4.2.1 . With this version ‘show page source’ on browser does not have any html elements in <body> tag except script tags for meteor packages. I cant guess till what previous version of meteor it was working and it is difficult to downgrade as well.

You have any idea how is this effect related to meteor version update ?
https://github.com/kadira-samples/meteor-data-and-react
The sample downloaded from above is with meteor 1.3-beta.11 and ssr works there.


After update to 1.4.2, FlowRouterSSR not working
#11

Sorry, I haven’t been using Meteor for a long time, can’t help you.

You should probably open a new topic with this question - maybe someone familiar with this can help you :wink:


#12

I love the pre render with galaxy. It’s amazing.

I feel like SSR is over optimizing for most apps unless you have a specific need.


#13

Was that a pun? :thinking::wink:


#14

If you’re not afraid using Universal-router, I made ProtoStarter to showcase SSR in a Meteor + React app (I used React-Viewmodel, but you can ignore it and build your React components as well)
erwerwer
It is actually fairly easy to do thanks to server-render package.

I am sad that Blaze doesn’t have SSR, and in general, that Blaze is not reworked like it should. It was fairly easy to write Blaze (especially with ViewModel) and it’s sad MDG gave up to React developers.

I moved to React because no other choice, but I am kind of sad as well. I thought Blaze had great potential to be something good.