instances of keepAlive child component are retained after HMR #1624
konpeki622
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I have a question, thank you for your time.
In vue3, if the child component of
keep-alive
was selected, it still shows old state on the devtools panel after I changed some data of the component. The reason is that new instance calledmounted
but the old instance ofkeep-alive
components calleddeactivated
withoutunmounted
during HMR. I think that is designed correctly but it just triggered the eventcomponent:added
withoutcomponent: removed
in devtools, which means the old instance was still stored ininstanceMap
and the old state was shown because theselectedId
was not changed.It took up space and make old state show as a consequence, so is it necessary to remove the old instance, or stay them here?
Beta Was this translation helpful? Give feedback.
All reactions