djhi / my-nutrition

A Meteor application using Webpack, React and Redux for nutritionists who coach people.
MIT License
80 stars 25 forks source link

Resubscribing doesn't properly load data #14

Open dbismut opened 8 years ago

dbismut commented 8 years ago

Hey @djhi - your project is the best thing that happened to me in understanding how Redux works with Meteor in a clean way.

However, I've changed some things in the way you handle subscriptions in the MeteorSubscription middleware.

  1. I think there is a bug at line 4 where handles and computations are defined as arrays [] while they should be objects {}.
  2. Stopping subscriptions when they already exist doesn't work for me: for example, when I logout from my app, and then re-login, the new subscription never gets ready() and I'm stuck at loading (possibly because of the way I handle auth, I don't know). My way of making it work at the moment is to skip the new subscription, but I guess I might run into issues.
djhi commented 8 years ago

Good catch, thx for reporting this. I'll take a look asap