why do i have to manually declare emits? #6406
Unanswered
ITwrx
asked this question in
Help/Questions
Replies: 1 comment 1 reply
-
Likely in order to your code editor knows when you are listening for an event not emitted by the child. It prevent some mistakes. I like it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If i emit an event in a child component why am i also required to "declare" it in the same component? Why isn't my emitting a named event also "declaring" it? IOW, why can't vue just handle that for me? Why this (admittedly small) extra cognitive load/docs for new vue devs, and seemingly unnecessary boilerplate going forward?
Is this a legitimate feature request for core, or it has to be/stay this way for some reason?
thanks
Beta Was this translation helpful? Give feedback.
All reactions