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

why $destroy was removed? #3676

Closed
codon19 opened this issue Apr 26, 2021 · 2 comments
Closed

why $destroy was removed? #3676

codon19 opened this issue Apr 26, 2021 · 2 comments

Comments

@codon19
Copy link

codon19 commented Apr 26, 2021

What problem does this feature solve?

Hello, why $destroy was removed? I'm sorry that I didn't find a detailed explanation, only a simple explanation. 'Users should no longer manually manage the lifecycle of individual Vue components'.

When using Keep-Alive to cache multiple instances of the same component, a component instance needs to be destroyed manually.

What does the proposed API look like?

this.$destroy()

@HcySunYang
Copy link
Member

See https://v3.vuejs.org/guide/migration/introduction.html#removed-apis

Users should no longer manually manage the lifecycle of individual Vue components.

Regarding KeepAlive cache management, you can track it in vuejs/rfcs#284

@codon19
Copy link
Author

codon19 commented Apr 26, 2021

Regarding KeepAlive cache management, you can track it in vuejs/rfcs#284
thank you

@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants