Skip to content

Compatibility Listing

This Page details all of the differences between Vue 2 and 3 that you will have to be aware of and account for when writing cross-compatible code.

Each of the points listed has it's own dedicated page explaining how to deal with it, and how to do so in the safest and easiest way possible.

Legend

BadgeDescription
🔍 EslintCompat can be ensured by an eslint rule
✅ PluginCompat is (at least partially) provided by the @vue-bridge/runtime plugin
👩🏽‍💻 DisciplineCompat needs to be ensured by the developer without tooling support. Following these rules is generally straightforward and low-risk
⚠️ PitfallLike 👩🏽‍💻 Discipline, but with a noteworthy risk of introducing bugs because these are easy to miss

This can seem like a lot, so make sure to read the Guide to learn how to navigate all of this.

🛑 Incompatible

These concern features / syntax that is straight up incompatible, though some have workarounds.

🛠 Compatibility achievable

This section covers featues that are mostly the same in Vue 2/3, but have some special cases and situations where the developer has to make sure to account for limitations or differences.

Reactivity

  • Always Respect Vue 2 Reactivity Caveats ⚠️ Pitfall ✅ Plugin
  • Don't use Maps & Sets in Reactive Data 👩🏽‍💻 Discipline

Transitions

$attrs / $listeners / inheritAttrs

  • Respect version-specific content of $attrs & $listeners 🔍 Eslint✅ Plugin
  • Always respect $attrs and class/style special treatment in Vue 2 🔍 Eslint✅ Plugin

Misc

  • Always configure the emits: option 🔍 Eslint
  • Always respect v-bind order precedence of Vue 3 ⚠️ Pitfall
  • Always use null to remove non-boolean attrs. not false 👩🏽‍💻 Discipline
  • Always respect Vue 3's v-if - v-forprecedence 🔍 Eslint
  • Always use the is prop with special <component> 🔍 Eslint

🧬 Polyfilled by @vue-bridge/runtime

  • v-model prop and event names (patched for Vue 2 by plugin) ✅ Plugin
  • this.$set / this.$delete (removed in Vue 3) ✅ Plugin
  • Some Component Lifecycle Hooks (patched for Vue 2 by this plugin) ✅ Plugin
  • Custom Directives (Lifecycle hook names patched for Vue 2 by plugin)✅ Plugin
  • TODO: defineAsyncComponent() (only exists in Vue 3) 🔍 Eslint✅ Plugin

Released under the MIT license