Subscribe on changes!

Child components in the emits events setting, if the parent component does not listen for an event, hope do not produce a warning

avatar
Dec 10th 2020

What problem does this feature solve?

When defining components, method hooks are often exposed, but not every hook caller needs attention. It can be frustrating to generate a warn prompt often. Just like

Component emitted event "xxx" but it is neither declared in the emits option nor as an "onXxx" prop.

Is there any way to solve it at the moment? Similar to props for default, but I only see the validation in the documentation, not the default associated

What does the proposed API look like?

Sorry, I have no valid ideas to offer

avatar
Dec 10th 2020

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.

See https://v3.vuejs.org/api/options-data.html#emits for more info about emits