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

HMR on keepalive components caused error #5073

Closed
konpeki622 opened this issue Dec 8, 2021 · 3 comments
Closed

HMR on keepalive components caused error #5073

konpeki622 opened this issue Dec 8, 2021 · 3 comments
Labels
🐞 bug Something isn't working scope: keep-alive

Comments

@konpeki622
Copy link

konpeki622 commented Dec 8, 2021

Version

3.2.24

Reproduction link

codesandbox.io

Steps to reproduce

  1. click go to bar and then click go to foo, to make the component Bar deactivated.
  2. click go to bar, modify the code line 18 in Bar.vue: const message = ref("test") -> const message = ref("any other words").

What is expected?

New message was shown.

What is actually happening?

TypeError: parentComponent.ctx.deactivate is not a function.


I have seen the similar issues and they do not resolve this problem. This issue was mentioned in the latest comment in #4387 . The parentComponent of Bar is itself instead of keep-alive When HMR occurs.

@Chenshyboy
Copy link

#5165, it can fix it, I add a test case to reappearance the situation
this problem is related to cache of keep-alive

@mutolee
Copy link

mutolee commented Jul 3, 2022

@LinusBorg 请问这个问题有处理进展吗,官方是否修复了这个问题?

@zhangzhonghe
Copy link
Member

Duplicate of #6222 and #7042. This issue has been fixed in v3.2.45

@github-actions github-actions bot locked and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working scope: keep-alive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants