Changing subscriptions
See original GitHub issueI noticed in both grapher-react and the grapher guide, that you create new subscriptions without unsubscribing to the old ones. Even though the subscription handle on the query is overwritten, the old subscription remains active! This is what I do in my Vue helper:
let oldSub = _.clone(query.subscriptionHandle)
query.subscribe()
oldSub && oldSub.stop()
(If you unsubscribe before you subscribe, you lose any data that the old and new subscriptions may have shared, causing flickering).
Maybe query.subscribe() should automatically do this if a subscription already exists?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
How to switch to a different subscription plan
Open the Settings app. Tap your name, then tap Subscriptions. Tap the name of the subscription that you want to change. Tap See...
Read more >Change subscriptions
Learn how to change existing subscriptions. ... Stripe supports changing existing subscriptions without having to cancel and recreate them.
Read more >Cancel, pause, or change a subscription on Google Play
Open the Google Play app Google Play . · At the top right, tap the profile icon. · Tap Payments & subscriptions and...
Read more >Change your Microsoft subscription payment method and ...
Subscriptions with recurring billing. If you have a Microsoft subscription with recurring billing, you can change how you pay at any time.
Read more >Change Your Subscription - Help - The New York Times
Learn how to add another subscription or change your digital subscription. If you have a digital subscriber, you may have the option to......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Herteby if you use grapher-react, it uses createContainer(), and inside it it subscribes, createContainer auto unsubscribes anything inside it when it’s unmounted.
This process is handled by createContainer, they automatically destroy subscriptions when component is unmounted.