5% of your first Autoship
  • AED
Category
No categories were found
Brand
No Brand were found
Product
Start typing for search results
Nest 0 Cart
Your cart is empty.

Something missing? Sign in to see items you may have added from another computer or device.

Technology

How to migrate from Vue 2 to Vue 3

How to migrate from Vue 2 to Vue 3

The Vue.js team recently announced that Vue 2 will reach its end of life by 2023. And that’s the perfect reason to start thinking about migrating your Vue 2 application to Vue 3.

The process of upgrading an app to the latest version of the framework can be a daunting task. But gladly for us, since June 2021, the Vue.js Team released a Migration Build to make the migration process easier.

This article will focus on our experience migrating a large-scale application from Vue 2 to Vue 3.

Should I really migrate to Vue 3?

The answer is yes. As mentioned before, Vue 2.0 will reach its EOL at the end of 2023, so you should start planning this. And there are more reasons to migrate, such as:

  1. Faster rendering. Benchmarks mention that the initial render is up to 55% faster, updates are up to 133% faster, and memory usage has been lowered to 54% less.
  2. Improved TypeScript. Its codebase was entirely written in TypeScript, with auto-generated type definitions. You'll have pretty neat stuff like type inference and props type checking right within templates.
  3. You can now use Composition API. You might hate it first if you're too used to building components with the Options API, but the Composition API will improve your Developer Experience once you get used to it. Nevertheless, if you really want to, you can still keep building with the Options API, which is still 100% supported.


Workflow Strategy

We’ve experienced this migration on a large-scale application that millions of users use. And we also had another ongoing scope around the application while we did the transition — we worked on new features and bug fixes in parallel. The project’s new features couldn’t stop until we completed the migration.

To optimize both works at the same time:

  • All the work that included new features, product support, and even tech debt, was still worked on our Vue 2 application;
  • All of the work for our Vue 3 migration was done on a separate branch with multiple sub-branches.

For every change we pushed to the main branch, we had to sync our Vue 3 branch and apply whatever necessary changes needed to make it Vue 3 compatible.

Having a successful migration meant not breaking anything. So, to ensure that everything was ready to finish the transition, we made the application go through a full regression test to be sure every feature fully worked.

Hit Infotech
Hit Infotech

10 posts Since 2012

Hi there, I am a veteran food blogger sharing my daily all kinds of healthy and fresh recipes. I find inspiration in nature, on the streets and almost everywhere. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet id enim, libero sit. Est donec lobortis cursus amet, cras elementum libero

whatsapp_img