'Extraneous non-emits event listeners were passed to component' warning? #6681
Unanswered
jez9999
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using vue-router, and I'm trying to trigger a handler on my parent element by emitting an event from a child element. The code looks a bit like this:
Parent.vue
Child.vue
This works when Vue Router is rendering Child.vue, but for every other child component (which isn't explicitly doing a
defineEmits(['setContainerClass'])
) I get a console warning:Why am I getting this warning and how do I avoid it? I don't want to have to explicitly
defineEmits(['setContainerClass'])
on every child component, as most of them aren't going to emit that event.Beta Was this translation helpful? Give feedback.
All reactions