Skip to content

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

Closed
@BobWithHair

Description

@BobWithHair

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions