8000 Nested routes with keep-alive creates child on hidden branch · Issue #3195 · vuejs/vue-router · GitHub
[go: up one dir, main page]

Skip to content
Nested routes with keep-alive creates child on hidden branch #3195
@davidmoser

Description

@davidmoser

Version

3.1.6

Reproduction link

https://jsfiddle.net/7v8hje5d/8/

Steps to reproduce

  • Open console
  • Click on link /A/1
  • Click on link /B/1

What is expected?

  • First click creates child with parent A
  • Second click creates child with parent B

What is actually happening?

  • First click works as expected
  • Second click creates two children, one with parent A and one with parent B

I used a key in the router view to make sure children with the same parent get cached independently:
:key="$route.fullPath"

The setup works correctly if the router views have no keys and different child component types.

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

      0