Skip to content

Add documentation entry for watch store unsubscription on component #1050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PonyLux opened this issue Nov 7, 2017 · 5 comments
Closed

Add documentation entry for watch store unsubscription on component #1050

PonyLux opened this issue Nov 7, 2017 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@PonyLux
Copy link

PonyLux commented Nov 7, 2017

What problem does this feature solve?

Actually there are no information regarding the necessity to "unsubscribe" store watch on component destroy.

It would be good to set a warning on the API documentation (https://vuex.vuejs.org/en/api.html) to let users know that without explicit unsubscription, the watch will be keep even after component destroy.

This issue has been reported here #599 and closed as a won't fix.

This problem cause memory leak and in most of the case errors extremely hard to debug.

What does the proposed API look like?

For a minimalist resolution

A warning quote in https://vuex.vuejs.org/en/api.html .

Nice to have

A new entry in menu to explain how to use watch (and then the tips for the unsubscription).
It could be great to give a better knowledge of this feature.

@LinusBorg LinusBorg added the documentation Improvements or additions to documentation label Nov 8, 2017
@karanisverma
Copy link

@LinusBorg I would like to pick this up

@kiaking
Copy link
Member

kiaking commented Apr 23, 2020

It could be nice to have this added in the doc I think. It has been awhile but do you want to work on with this @karanisverma?

@karanisverma
Copy link

Hey @kiaking, sorry I would not be able to pick this up.

@kiaking
Copy link
Member

kiaking commented May 1, 2020

@karanisverma OK! Thanks for checking 👍

@anschwa
Copy link
Contributor

anschwa commented Sep 30, 2020

I would also like to see this get added to the docs. I opened a PR here: #1838

@kiaking kiaking closed this as completed in 1c693b6 Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants