Let’s summarize information about Vue 3 – the new version of Vue.js

Tram Ho

You know, we’re about to welcome a new, eye-catching Vue.js release – the one that father Evan You announced since the fall of 2018 in London. Until Vue 3 is officially released, we will be here and continue to gather valuable information and resources for you, you will definitely not miss anything!


Vue release date 3

The official release is scheduled for Q3 2020 – according to the roadmap . It’s in ready-to-release (RC) stage! (This is the official RC status announcement !)

This means that the APIs and implementations are now really stable and there won’t be any more disruptive changes. The team and all of those working on these libraries will need to work to smooth out any possible issue angles before the official release.

New documentation has been published, along with the migration guide that tells you what has changed. Both are still in beta, but are already quite complete (and very readable and well structured, like the Vue docs have).

You can start testing a new version. Just go and have fun with it! If you find bugs while building test apps, report them through Vue Troubleshooter .

To make it easier for you to start your experiment, these are the most important tools. Remember they are all WIP:


Vue Features and Changes 3

As Evan You summarized, Vue 3 is faster, smaller, easier to maintain, and easier to target native.

Composition API

One of the most important changes is that the new API will allow the way your component is written on function, inspired by React Hooks.

It allows you to encapsulate logic into “aggregate functions” and reuse that logic across components. Read the full Request for Comment (RFC) for more information or see the API reference. (The API has been renamed from “functional API” to “aggregate API”, so don’t let that confuse you if you read that name anywhere!)

Yes, that changes the way we use Vue. However, it won’t break anything in your Vue 2.x application, since the new API is 100% compatible with the current syntax, this syntax will be deprecated soon.

We personally think this change will give us a lot of flexibility and lead to better structured code.

If you want to start experimenting, the new component API is already available for 2.x as a plugin and has an API reference (in development).

Other changes in Vue 3:

  • Rewrite the virtual DOM for better performance and improved TypeScript support
  • The Native Portal technique – also known as Teleport
  • Using Fragments, the fragments will not be displayed on the DOM tree
  • Change in mount in scope global (Global mounting)
  • Delay render components conditionally
  • … and more.

You can read more about the process of rewriting the new version of Vue.js and how to make a decision in this article by Evan You  Process: Creating Vue 3


Vue conversion problem 2

So what will happen to Vue 2 and how will the conversion be handled? There will be a final release for version 2 to support Vue 3 compatible features and at the same time we will have more deprecation warnings for important changes.

Vue version 2 will still be available as an LTS (long-term support) version for 18 months, meaning it will still receive security updates and be completely safe to keep using.

There’s a migration guide (beta) and there’s also a compatible build for Vue 3. A command-line migrate tool will also be available, helping you to automate the migration as much as possible and offer suggestions about where you will need to upgrade manually.

Should I choose Vue 2 or 3 for a new project?

If you decide to use Vue for a new production project, it is still an official recommendation to start with Vue 2 now. And if you choose Vue 2, keep track of changes and avoid using removed features as well as potentially third-party libraries not being updated quickly.

If you can wait until Q3 2020, then there’s no reason not to choose to start developing with Vue 3.

(All of these information and recommendations are taken from the Official FAQs in the Roadmap for Vue 3. Check them out if you have more questions!)


About learning Vue 3

A lot of resources are available to help you learn more about the new functions:

Vueschool is also updating their Master Class course to Vue.js 3 and providing an overview of the Special New Features in Vue 3 . As of now it’s not available yet, but you can leave your emails to be notified when they launch. If you’re a little bit worried that version 3 will hurt you, then getting ready and researching is a great way to combat that.

Should I start learning Vue 2 or Vue 3?

If you’re new to Vue, don’t hesitate to start learning with the vast v2 resources out there. Most of the key concepts of the framework remain the same, and your knowledge will still be valuable when v3 launches.

Many v3 changes are internal, such as overriding the virtual DOM implementation and writing the codebase in TypeScript. This will make Vue faster, but you won’t have to use TypeScript if you don’t want to.

The Vue development team is really great when it comes to documentation, and they’ve got the beta version of the v3 documentation already. Take a look at our list above to check out some of the first v3-focused courses, if you want to get started with it.


Vue 3 drama

In case you still remember hearing something strong about version 3, we want to remove that so you can expect it to look like us

What would change without a bit of drama? There was a lively discussion in the community (f.ex. on HackerNews and on Reddit ) when the RFC for Composition API was first released in June 2019.

Community members had a bit of agitation (and sometimes rude, sadly) – mainly because at first it wasn’t clear to them whether the new Composition API would be added as an addition. like (this will happen)! Or will the current API be deprecated (and not) !. Also, people are afraid that all the time they spend learning Vue 2 will be wasted (that’s not it!).

If you’re still a bit apprehensive about version 3 because of some negative reviews, here are a few articles explaining why you shouldn’t:

Framework changes can be stressful. But we believe the changes in v3 will be a big leap and you’ll have time to adapt.


This article was translated from: Vue 3 – A roundup of infos about the new version of Vue.js. Thank you very much for your attention!

Share the news now

Source : Viblo