Allow <keep-alive> to act like v-show #12846
BobWithHair
started this conversation in
Ideas
Replies: 1 comment
-
Thanks for your feedback, but Issue is used to collect bugs, and I turned it into a discussion to collect more discussions from the community. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
What problem does this feature solve?
In a single page app.
Trying to use to keep a alive that displays long lists of items has a lower performance than manually handling the component visibility with
v-show
.Currently, using in combination with causes the UI to freeze as it still re-renders the list items when switching between routes. (Yes, it was implemented correctly as shown here)
Having a way for the component to simply hide the kept alive components the same way that
v-show
does would allow me to use the it in combination with and keep the same performance improvements I currently have with v-show.What does the proposed API look like?
A component prop like
<keep-alive strategy="[some strategy option]">
would be perfect.Not sure of the option names, but something that would allow us to decide between the "classic" keep alive strategy and the
v-show
strategy.Beta Was this translation helpful? Give feedback.
All reactions