Skip to content

a component that passes slots to children forces children to rerenderΒ #5579

Open
@Gagydzer

Description

Version

3.2.31

Reproduction link

github.com

Steps to reproduce

I've found some cases that shouldn't makes slot-component to update, but it does. Only case #1 works properly. It looks like a bug, because it affects at lot of cases when you want to pass slots through a component to a children with this technique.

Vue.component('W', {
  props: ['child'],
  template: `<component :is="child">
  <template v-for="(_, name) in $slots" v-slot:[name]="slotData"><slot :name="name" v-bind="slotData" /></template>
</component>`
})

What is expected?

no updates in children component

What is actually happening?

it does update

Metadata

Assignees

No one assigned

    Labels

    need guidanceThe approach/solution in the PR is unclear and requires guidance from maintainer to proceed further.scope: slots

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions