A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue-next/issues/3695 below:

Slot throws warning when passed down to component and rerendered · Issue #3695 · vuejs/core · GitHub

Version

3.0.11

Reproduction link

Gist with SFC Link

SFC Direct Link

Steps to reproduce

Create 3 components :

  1. GrandParent - should accept some data that re-renders a slot, for example, array of objects.
  2. Parent
  3. Child

GrandParent passes down all it's slots to the Parent component:

return h(Parent, { data: this.data }, this.$slots)

Parent component should render the slot inside the Child

h(Child, {} , {
 default: () => row.key
}))

In the root app (App.vue) call the GrandParent and add a slot

<GrandParent :data="data">
    <template #cell-hello>Test</template>
  </GrandParent>

Now asynchronously update the data array and Vue will throw a read-only warning for the given slot:

Set operation on key "cell-hello" failed: target is readonly. {__vInternal: 1, cell-hello: ƒ}
What is expected?

Not to throw a warning

What is actually happening?

Throwing a warning but everything works.

This started happening after updating to 3.0.11. AFAIK this is related to #3523 and started happening after this update.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4