Ask Your Question
0

What does the "Extraneous non-emits event listeners" warning in Vue.js mean for events on RouterView?

asked 2022-10-01 11:00:00 +0000

lalupa gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-07-27 17:00:00 +0000

huitzilopochtli gravatar image

The "Extraneous non-emits event listeners" warning in Vue.js means that there are event listeners that have been added to a component but are not being emitted by that component.

In the context of RouterView, this warning is typically related to event listeners that have been added to the RouterView component but are actually intended to be emitted by child components within the RouterView.

For example, if a child component within the RouterView emits a "close" event, but there is also an "onclose" event listener added to the RouterView component, then the warning may be triggered because the "onclose" listener is not actually being emitted by the RouterView itself.

To resolve this warning, you can either remove the extraneous event listeners from the RouterView component or ensure that the appropriate child components are emitting the events that are being listened for.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-10-01 11:00:00 +0000

Seen: 13 times

Last updated: Jul 27 '22