JavaScript

JavaScript

Made by DeepSource

Deprecation of .native modifiers JS-0655

Bug risk
Major
vue

To migrate to Vue 3.x, consider making the following changes: - .native modifier for v-on will be removed. - this.$listeners will be removed. - inheritAttrs: false now affects class and style. - this.$attrs now contains everything passed to the component - Functional components attribute fallthrough behavior adjusted: - With explicit props declaration: full fallthrough like stateful components. - With no props declaration: only fallthrough for class, style and v-on listeners.

Bad Practice

<CoolInput v-on:keydown.native="onKeydown" />
<CoolInput @keydown.enter.native="onKeydownEnter" />

Recommended

<CoolInput v-on:keydown.enter="onKeydownEnter" />
<CoolInput @keydown.enter="onKeydownEnter" />