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
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:
- Beta version of the new Vue Devtools
- Official router for Vue 3
- Vue CLI plugin for the next release
- Vue 3 version of Vue Test Utils
- Vuex 4’s new alpha release is also compatible with Vue 3, and offers the same API as Vuex 3.
Vue Features and Changes 3
As Evan You summarized, Vue 3 is faster, smaller, easier to maintain, and easier to target native.
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.
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:
- What’s new in Vue 3 and Composition API courses by Codecourse (courses with video)
- Vue 3 Tutorials (for Vue 2 users) by Anthony Gore of vuejsdevelopers.com (written instructions)
- Vue Mastery’s Vue 3 Essential Course (course with video)
- Introduction to the Composition API by Gregg Pollack (video of his talk at Vue.js Amsterdam 2020)
- Things you’ll love in Alex Kyriakidis’s Vue 3 (video of his talk at Vue.js Amsterdam 2020)
- Thorsten Lünborg Composition API Best Practices (video of his talk at Vue.js Amsterdam 2020)
- Vue 3 & a first look at the Composition API by Academind (video)
- Hello Vue 3: A first look at Dan Vega’s Composition API 3 and Vue (video)
- A wild new look at the Composition API in Mateusz Rybczonek’s Vue 3 on css-tricks.com (post)
- Vue 3 and Alex Kyriakidis’s Composition API (screened from his Vue Toronto talk)
- Interesting new features in Filip Rakowski’s Vue 3 on vueschool.io (article)
- Live coding: Jason Yu’s new Composition API (video)
- Take a look at Natalia Tepluhina’s Vueture: Composition Functions (video) (here ‘s her presentation of this talk at ComponentsConf!)
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
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:
- Vue’s Darkest Day written by Daniel Elkington on dev.to
- Why are people so upset with Vue 3 by Alex Kyriakidis on vueschool.io
- 3 Key insights from Kevin Ball’s new functional RFC APIs from Kevin Ball on zendev.com (we particularly liked the fact that he pointed out that this change shows that which framework you choose doesn’t matter , what we do also mentioned above)
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!