-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
TypeError: parentComponent.ctx.deactivate is not a function #1865
Comments
It doesn't show any error after upgrading vue dependencies to the latest ones. On your repro I removed the yarn.lock file and ran yarn and everything works |
I just removed Also on my main project, I updated all dependencies in the same way and the problem did not get resolved. |
Did you switch from branch |
I see it in the branch. The problem is you are using the same key for two different components because you are not filtering what you are keeping alive. So you have either provide a unique key based on the route path/name + the id, that way KeepAlive will be able to restore the correct component, or use <KeepAlive include="MessagesChat">
<component :is="Component" :key="id" />
</KeepAlive> and give BTW, you should not use |
Oh, but I already had problems with the key for KeepAlive, and I met with them again. Thanks, I used |
THANK YOU VERY MUCH !!! |
THANKS |
why google is stupid |
Version
3.0.0-rc.5
Reproduction link
https://github.com/danyadev/vue3-bug/tree/bug-2
Steps to reproduce
1.1 git checkout bug-2
1.2. yarn
1.3. yarn dev
What is expected?
no errors
What is actually happening?
in tests, the version of vue-router was always 4.0.0-beta.6
The text was updated successfully, but these errors were encountered: