kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 195 forks source link

Deactivate FastRender for SSR #667

Closed TimoRuetten closed 7 years ago

TimoRuetten commented 7 years ago

I am wondering if its possible to deactivate FastRender for SSR. Currently when rendering our app on Server the DOM is loaded correctly and under the DOM output there is still the fast-render string. In our case we are loading around 1.000.000 Documents from our Collection so everytime when google is crawling us google needs to load around 6MB of Data (~5.8MB of data is fast-render data only).

So I am wondering why the SSR output still needs fast-render because the DOM is loaded correctly before and if its possible to deactivate.

TimoRuetten commented 7 years ago

This question was already here:

https://github.com/kadirahq/flow-router/issues/350

So it seems that fast-render is necessary currently. Hopefully there will be an update so it can be removed.

sahanDissanayake commented 7 years ago

You might find this package a bit useful to render data and fetch data only on the client side https://github.com/kadirahq/react-no-ssr

On 14 Jul 2016 6:37 am, at 6:37 am, "Timo Rütten" notifications@github.com wrote:

Closed #667.


You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kadirahq/flow-router/issues/667#event-721995820

TimoRuetten commented 7 years ago

Thanks @sahanDissanayake but this will only exclude some Components from the Server not the fast-render data, correct ?

If an component subscribes some data I would wrap this with NoSSR but then I dont have the data on Server I need. The problem I have is not that I have data on Client which I do not need on Server and want to exclude - my problem is that inside the returned DOM from SSR the injected data string is included.

sahanDissanayake commented 7 years ago

I don't know inside out of NoSSR. But if you wrap a container that is subscribing to a publication inside a NoSSR block. then that subscription will not get data till the component is mounted on the client.

So which in return you will not see the data inside the injected data string on the DOM. I mean this is one way