Vue emits "Extraneous non-emits event listeners" warning for events on RouterView #1736
-
Reproductionhttps://stackblitz.com/edit/vitejs-vite-jy1j3d Steps to reproduce the bugListen for an event on Expected behaviorVue detects that one of the child components that may be rendered by the router view emits the event, and doesn't give the warning. Actual behaviorVue gives the warning. Additional informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
This is not related to the router: the Home component doesn't declare that emit, that's why you see the warning. Since the |
Beta Was this translation helpful? Give feedback.
-
@posva But why should the Home component need to? There needs to be a mechanism to allow any child component that may be rendered by a |
Beta Was this translation helpful? Give feedback.
-
@posva Kindly re-open this discussion, it is NOT resolved, I have NOT received a decent answer to my query, and you DIDN'T even ask me before closing it. 😠 |
Beta Was this translation helpful? Give feedback.
This is not related to the router: the Home component doesn't declare that emit, that's why you see the warning. Since the
@displaymodal
is always bound to whatever component RouterView renders, when it renders a component that doesn't emit the event, Vue will warn you about it.