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
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I have a question, thank you for your time.
In vue3, if the child component of
keep-alivewas selected, it still shows old state on the devtools panel after I changed some data of the component. The reason is that new instance calledmountedbut the old instance ofkeep-alivecomponents calleddeactivatedwithoutunmountedduring HMR. I think that is designed correctly but it just triggered the eventcomponent:addedwithoutcomponent: removedin devtools, which means the old instance was still stored ininstanceMapand the old state was shown because theselectedIdwas 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