kadirahq / fast-render

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

Works only after full page reload. (Doesn't work after click on some link) #89

Open michaelrokosh opened 9 years ago

michaelrokosh commented 9 years ago

If I click reload button everything looks fine. FastRender.debugger logs are on. But during surfing between the routes (via navigation bar links etc) the spinner appears, and the FastRender.debugger is not logging. So it doesn't work. Any ideas?

kk4sh commented 9 years ago

I have the same annoying problem by using simple configuration inside iron-router with a waiton wiwh returns a subscription. I dont know exactly if it's a misuse or a real issue... Following logs occur only the 1st time < FR: injecting ddp message: Object> < FR: new subscription: SingleItem> < FR: sending fake ready for sub:SingleItem> < FR: re writing DDP for: Object > < FR: actual subscription complete> < FR: fast rendering completed!>

As a consequence, browsing seems even faster by not using the FR package. Help is needed. Thx

arunoda commented 9 years ago

Could you prepare a repo with this issue? Then I can debug it locally and try to fix this issue.

kk4sh commented 9 years ago

Instead of create a repo, you just have to use the meteor todos sample and moving the subscription to waitOn.

arunoda commented 9 years ago

todos example is bit different. For that, you need to create custom FR routes to get data. (I find it easy rather than moving the subscriptions to 'waitOn.)

if (Meteor.isServer) {
  FastRender.route('/lists/:_id', function(params) {
    this.subscribe('todos', params._id);
  });
}

I don't find any slowness with this approach.

kk4sh commented 9 years ago

donkey coding in my own implementation subsciption waiton was done on client ... Thanks for help

kk4sh commented 9 years ago

I create a repo which highlights the way i want to use fast-render/iron-router. The aim as a simple use case is to navigate through a light weight list of items (using easy search package or yours...) which doesnt carry all items data and to render a detailed view by selecting one of the item . Sample repo : https://github.com/kk4sh/FR-Nav-Test One more time, it is surely a misuse but i dont achieve to use both fr and get the subscriptions of the detailed items correctly. A little bit of help or a sample is welcome. Thanks a lot

jlsandri commented 9 years ago

@kk4sh Any updates on this issue? I'm also experiencing this problem.

I'm declaring FR routes using the API as @arunoda has outlined but they only work on an initial page load. Moving between routes on the client ceases FR's operation.

Is this by design or is this an issue?

icereed commented 9 years ago

Same for me. Can't get it working. Curiously it worked for all admin users but not for the normal ones...