You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sub Page component render only once. The create hook called once.
What is actually happening?
Sub Page component render twice, and the created hook called twice.
I have did some research about this issue, hope it helps.
Since the Home Page is keep-alived,so when jump to the About Page, the Home Page won't be unmounted, and the render effect of the Home Page's sub RouterView won't be cleared.
And then when we click this button, the currentRoute of our router changed, which will trigger all the RouterView to be re rendered. Under normal conditions, the RouterView component inside About component will be render as the Sub component. But unfortunately, the RouterView component inside Home component also be re rendered as the Sub component.
The text was updated successfully, but these errors were encountered:
Version
3.2.19
Reproduction link
github.com
Steps to reproduce
Home
Page.About
Page.Sub
Page.What is expected?
Sub
Page component render only once. Thecreate
hook called once.What is actually happening?
Sub
Page component render twice, and thecreated
hook called twice.I have did some research about this issue, hope it helps.
Since the
Home
Page is keep-alived,so when jump to theAbout
Page, theHome
Page won't be unmounted, and the render effect of theHome
Page's subRouterView
won't be cleared.And then when we click this button, the
currentRoute
of ourrouter
changed, which will trigger all theRouterView
to be re rendered. Under normal conditions, theRouterView
component insideAbout
component will be render as theSub
component. But unfortunately, theRouterView
component inside Home component also be re rendered as theSub
component.The text was updated successfully, but these errors were encountered: