SSR not working with Meteor and react-router


#1

Good evening,

So I tried implementing SSR into my Meteor-React application (mostly because of SEO
reasons) following this example (https://github.com/minhna/meteor-react-ssr) except I’m
not using react-loadable.

My problem now is that the page either

  1. Seems to be working, but still gives an error in the JavaScript console:
    Warning: Expected server HTML to contain a matching <p> in <div>
    That’s the case for most desktop users.

Or

  1. Seems to be only loading server-side code not adding React event handlers, React Lifecycle-Methods or Jquery
    This problem occurs mostly in mobile browsers like Chrome for Android, but reportedly sometimes also occurs in desktop browsers.

Is there anyone out there who could help me with this?

Thanks in advance,
TVXtrem


#2

Follow this very clear and efficient tutorial and you should be fine :

your fist error means that the DOM tree rendered by Server differs from the one renderer by client at first rendering.


#3

Edit: I found out that the Google crawler wont load css and! external images cause my page to be rendered blank. The rest is working now.


#4

How did you fix this @TVXtrem ? We’re running into the same problem now