Meteor SSR page render screen flash

#1

Things with SSR are starting to make more sense which is great. Thanks for all the help so far.

I’ve started noticing that on SSR loaded pages there is a screen flash (kinda like a page reload). I think this is related to hydration. It’s not a very clean user experience and I’d like to get rid of it if possible.

Is this normal?

Please let me know if I need to post code.

1 Like
#2

You probably use some data-fetching-library like apollo or meteor collections.

These libraries need to also “hydrate” or refill their cache, otherwise they have to refetch the data. E.g. if you use a meteor collection, it is empty when the javascript on the client starts. If for example you render a list based on this collection, this list will be empty right after hydration, altough the server render returned the full list as html.

for apollo graphql see here https://www.apollographql.com/docs/react/features/server-side-rendering#store-rehydration

for meteor collections/pub-sub use https://github.com/abecks/meteor-fast-render

also check your console if react gives a warning about hydration

1 Like
#3

Do you have a public repo? Would be much easier to look into this…