Skip to content

Kept alive components still update (renders, watchers) while being deactivated #5386

Open
@posva

Description

@posva

Version

3.2.30

Reproduction link

sfc.vuejs.org/

Steps to reproduce

  • Click increment
  • Click change page
  • Click increment
  • Observe the logs

What is expected?

  • Logs of One and then logs for Two (only)

What is actually happening?

After changing the page once, the Page One keeps rendering while being inactive


This has been confusing to many people but I couldn't find if this behavior is expected or not

This also means watchers are executed in deactivated branches

It also worth noting that the component being deactivated renders before being deactivated. Making it impossible to skip the render with likely incorrect data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't workingneed guidanceThe approach/solution in the PR is unclear and requires guidance from maintainer to proceed further.scope: keep-alive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions