-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Extraneous non-props attributes passed" warning posted for v-on attribute #1001
Comments
I wonder if the intended way to resolve that warning would be for the parent component of the fragment to declare "btn-clicked" in I think there are cases where a user might attach a listener and not understand why it doesn't pass down to the fragment, so it might be better to provide
For Function components you can also use emits to prevent the warning. The problem with not warning at all is I think it's easy for someone to add, say, a click event to that parent of the fragments and expect it to work. So I think directing the user to declare an event or prop might be better. Code-wise, it seems like in dev there may need to be logic for functional components similar to that of stateful components, which checks for usage of |
@aztalbot yes, in this case the warning should nudge the user to add the emitted event to the |
|
If you are using a custom component that takes in Example
Then you can call it like |
Version
3.0.0-beta.2
Reproduction link
https://jsfiddle.net/dajb4q2k/1/
Steps to reproduce
What is expected?
The event should be thrown and no warning needs to be given
What is actually happening?
The even works perfectly fine, but a warning is thrown:
I think the warning should not be thrown for v-on attributes
The text was updated successfully, but these errors were encountered: