Subscribe on changes!

this.$slots cannot be assigned dynamically

avatar
Jul 4th 2021

Version

3.1.4

Reproduction link

https://codesandbox.io/embed/romantic-curie-xnfgd?fontsize=14&hidenavigation=1&theme=dark

Steps to reproduce

instance.slots.test not work in setup at helloWorld.vue

What is expected?

instance.slots.test can render node

What is actually happening?

in vue2.X,I can use this.$slots.test, but VUE3 instance.slots.test not work

avatar
Jul 4th 2021

That's an internal API that you should not touch. Why would you even do that? just render the vnodes directly. You can i.e. use <component :is="vnodes here">