arunoda / react-komposer

Feed data into React components by composing containers.
MIT License
733 stars 70 forks source link

Unsubscribing to publication #148

Open janzenz opened 7 years ago

janzenz commented 7 years ago

Based on the Meteor document, specifically:

When you are subscribing, it is very important to ensure that you always call .stop() on the subscription when you are done with it.

Based on the document this is done on automatically on getMeteorData:

However, if you call Meteor.subscribe() conditionally inside a reactive context (such as an autorun, or getMeteorData in React) or via this.subscribe() in a Blaze component, then Meteor’s reactive system will automatically call this.stop() for you at the appropriate time.

Is this done automatically on react-komposer or do we need to do it manually?

reggiepangilinan commented 7 years ago

No need to unsubscribe, it is automatically handled. https://github.com/arunoda/react-komposer/issues/5