I am currently developing a web frontend of an enterprise application with vuejs 2 and vuetify 2. The plan is to migrate to Vuejs 3 after the release.
Are there any coding pattern which should be avoided now for any easy future migration to vuejs 3?
The github for the Vue 3 release road map says:
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)
Before, moving on to the files here is the basic process that's need to be followed to migrate from Vue2 to Vue3: First, we make sure that our @vue/cli-service is in the newest version. To update our vue-cli command is – vue upgrade. Now modify our 'package.
Vue 3 is the current, latest major version of Vue. It contains new features that are not present in Vue 2, for example Teleport, Suspense, and multiple root elements per template. It also contains breaking changes that makes it incompatible with Vue 2. Full details are documented in the Vue 3 Migration Guide.
Buefy (8.7k stars on GitHub) integrates the CSS framework Bulma (43.7k stars on GitHub) into Vue. js 2 projects. However Buefy does not support Vue. js 3 yet.
If you are facing performance issues after doing various optimizations, then use Vue 3. This is written from scratch and offers better performance than its previous version. If you need better TypeScript compatibility use Vue 3, it's much better than before!
Are there any coding pattern which should be avoided now for any easy future migration to vuejs 3?
Yes. Class-based components should be avoided. They won't be marked as obsolete, but it won't be possible to use the composition API with them. Class components are not anymore the future of Vue.
On this subject:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With