kadirahq / fast-render

Render you app even before the DDP connection is live. - magic?
MIT License
560 stars 80 forks source link

Anyway to reinit Fast Render? Re-grab data from HEAD and fill up Minimongo? #190

Open sferoze opened 7 years ago

sferoze commented 7 years ago

I am using fast render and it is working normally.

But I am running into an issue, where if I use Meteor.disconnect() and then Meteor.reconnect() minimongo gets cleared out, since I am not using an subscriptions, and only using Fast Render to get data to client.

Upon reconnect Meteor resumes any subscriptions and since there are no subscriptions minimongo gets cleared. But the original fast render data is still in the head of the document. So upon reconnect I would like to reinit Fast Render and fill up minimongo.

I have tried running this code to reinit Fast Render

InjectData.getData('fast-render-data', function(payload) {
  FastRender.init(payload);
});

But for some reason it only loads one document per collection and then stops. Any advice on how to do this?

Alex509 commented 7 years ago

I am looking into it, facing the same issue, iäll let you know if i find something! @sferoze