The Wayback Machine - https://web.archive.org/web/20201110010706/https://github.com/vuejs/vuex/issues/1050
Skip to content
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

Add documentation entry for watch store unsubscription on component #1050

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

Comments

@PonyLux
Copy link

@PonyLux 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 docs label Nov 8, 2017
@karanisverma
Copy link

@karanisverma karanisverma commented Nov 22, 2018

@LinusBorg I would like to pick this up

@kiaking
Copy link
Member

@kiaking 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

@karanisverma karanisverma commented Apr 30, 2020

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

@kiaking
Copy link
Member

@kiaking kiaking commented May 1, 2020

@karanisverma OK! Thanks for checking 👍

anschwa added a commit to anschwa/vuex that referenced this issue Sep 30, 2020
anschwa added a commit to anschwa/vuex that referenced this issue Sep 30, 2020
@anschwa
Copy link
Contributor

@anschwa 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 in 1c693b6 Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.