vue.js - 从 VueJS2 轻松迁移到 VueJS3 的最佳实践?

标签 vue.js vuejs2 vuejs3

我目前正在使用 vuejs 2 和 vuetify 2 开发企业应用程序的 Web 前端。计划在发布后迁移到 Vuejs 3。

是否有任何编码模式现在应该避免,以便将来轻松迁移到 vuejs 3?

Vue 3 发布路线图的 github 说:

High level API remains as close to 2.x as possible. Breaking changes only made where necessary, and will be communicated through the RFC process. (https://github.com/vuejs/roadmap)

最佳答案

Are there any coding pattern which should be avoided now for any easy future migration to vuejs 3?



是的。应避免使用基于类的组件。它们不会被标记为过时,但无法将组合 API 与它们一起使用。类组件不再是 Vue 的 future 。

关于这个问题:
  • Type Issues with Class API
  • Vue 3.0 Discards Class-Based API for Reusable, Composable Function-Based Approach
  • 关于vue.js - 从 VueJS2 轻松迁移到 VueJS3 的最佳实践?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58367558/

    相关文章:

    javascript - Vue JS "PROP MUTATING"用于上传图像

    vue.js - 未定义 vuetify 数据表/ Prop 的非常奇怪的问题

    javascript - 如何通过 Vue.js 循环使用 JavaScript 中的表格制作的轮播

    vue.js - Vue 3 Composition API - 类似选项卡的组件中的 'child' 数据

    javascript - 如果使用 Jsx,如何在 Vuejs 2.x 中使用 Fragments?

    express - 将 Vue 与 Express 结合使用的最佳方式?

    javascript - Vue v-model 在使用 v-for 时不更新数组值

    javascript - VueJS 输入与嵌套数据的绑定(bind)

    javascript - HTML脚本标签中的Petite-vue Init属性

    javascript - 从提供给 Vue (Vue.js 3) 的 Vuex 访问实例/服务