Open
Description
Version
3.0.5
Reproduction link
https://codesandbox.io/s/vue3-slot-invoked-outside-warning-demo-ezuud
Steps to reproduce
Please have a look at the minimal reproduction.
As soon as I create a component inside of a "functional component", it show's a warning.
What is expected?
It shouldn't warn.
What is actually happening?
[Vue warn]: Slot "default" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.
The warning is only shown if I create the watch
in MyComponent.vue (or if I access isMandatoryOrSlotVisible.value
directly.)
If I use the same code without the surrounding MyContainer component, it work's without any warning. Since there is no invokation of the slot function in the surrounding MyContainer component, the warning is misleading.