Open theodorDiaconu opened 6 years ago
Just tried to clone this package and make these changes but it did not work.
Here's my setup:
When the user logs out, the subcomponent query is rerun, and the firewall throws an error, crashign the app on the client.
@Floriferous it's normal for the subcomponent to re-run.
You logout -> Your subscriptions get updated. If you did not unmount the component, it may take some time before React unmounts it thus triggering unsubscribe. I would advise you to do something like history.push('/login'); Meteor.logout()
, so you already unmount anything unnecessary.
Flow:
This was the fix, but I'm not sure exactly why, I leave it here to merge it later.