-
Notifications
You must be signed in to change notification settings - Fork 380
[Vue 3.0] Deprecation of Emit decorator #353
Comments
To provide some feedback: is there no chance of reconsidering deprecating the unique behaviors instead of deprecating the entire decorator, and are you sure that $emit satisfies all relevant use-cases? For example, personally I don't like how we can't disable emitting the passed arguments if we already return something else (which bloats Vue devtools even if we don't consume them, and having unused parameters introduces code stability risks, reducing effect of linters), but it's definitely preferred to be able to strongly type the $emit function without code duplication (of passing params) and explicit hard-coding of kebab-cased name that's hard to refactor (though the lack of options like an |
@scscgit Thanks for you feedback and I apologize you to may late replay. After I received your feedback, I was thinking about this plan. As this emit decorator seems to be widely used, I decided to keep this decorator and update for Vue 3. Of course, the new |
ref #352
History
Problem
First, this decorator's behavior is defined by this library itself.
I would like to keep this library easy to estimate those decorators' behavior. However,
@Emit
decorator has some unique behaviors, for instance, catch return value and arguments and emit them, treat with promise. On the contrary, these behaviors are easily implemented without using this decorator.Proposal
I'd like to deprecate
@Emit
decorator.Then, developers will use
this.$emit
instead.The text was updated successfully, but these errors were encountered: