-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Open
Labels
🧹 p1-chorePriority 1: this doesn't change code behavior.Priority 1: this doesn't change code behavior.🐞 bugSomething isn't workingSomething isn't working
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.
enkot
Metadata
Metadata
Assignees
Labels
🧹 p1-chorePriority 1: this doesn't change code behavior.Priority 1: this doesn't change code behavior.🐞 bugSomething isn't workingSomething isn't working