Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Allow <keep-alive> to act like v-show #12844

Closed
BobWithHair opened this issue Feb 10, 2025 · 1 comment
Closed

Allow <keep-alive> to act like v-show #12844

BobWithHair opened this issue Feb 10, 2025 · 1 comment

Comments

@BobWithHair
Copy link

BobWithHair commented Feb 10, 2025

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.

@edison1105
Copy link
Member

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.

@vuejs vuejs locked and limited conversation to collaborators Feb 11, 2025
@edison1105 edison1105 converted this issue into discussion #12846 Feb 11, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants