6

Which Vue.js version to use in 2020 and why

 3 years ago
source link: https://vueschool.io/articles/news/which-vue-js-version-to-use-in-2020-and-why/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Which Vue.js version to use in 2020 and why

Written by Alex Kyriakidis

Since the announcement of Vue 3 there are two questions I am frequently asked by newcomers and senior Vue developers.

  1. Should I use or learn Vue 2 in 2020?
  2. When is the Vue 3 Masterclass coming?

The Vue.js Masterclass is how Vue School started. It was originally created in 2016 as the next step for the readers of my book, The Majesty of Vue.js. The masterclass has taught Vue.js to 1000s developers and helped many of them land a relevant job. Also, many companies worldwide use the Vue Masterclass to train their teams, develop high-end front-end applications, and often for onboarding new employees.

In the Vue Masterclass people learn how to build production-grade websites with Vue.js. It begins with the basics, creating a new application, and step-by-step we build a full forum. We implement everything, including user profiles, permissions, threads, content management, live updates, and whatnot! The forum we build in the Masterclass is developed with Vue 2.

Vue 3.0, codename One Piece, was announced 2 years ago and was officially released in September 2020. Vue 3 is a complete rewrite of the framework. It comes with even better performance, better tree-shaking, smaller size, improved TypeScript support, and some revolutionary new features for developing large-scale enterprise software.

Thus, Vue 3 is awesome and was released a few months ago. But does this mean that we can or should use it in production just yet?

In this article I try to address all these questions. Let’s begin with the first one.

Should I learn Vue 2 or Vue 3 in 2020?

Most of the syntax and practices in Vue 2 remain the same in Vue 3, so it shouldn’t make a big difference if you learn Vue 2 or Vue 3. However, core, official, and community libraries are not yet compatible with Vue 3 so if you are aiming for production you better learn - and use - Vue 2 in 2020. This might sound a bit bitter but if you think about it, it makes sense! (more about this in the end of the post)

Vue 3 is basically a supercharged version of Vue 2. Vue 3 is even faster and lighter, comes with improved TypeScript support, and some great new features. The framework itself has been re-written from scratch but the API (how developers use it) remained the same. How awesome is that?!

Think of upgrading to Vue 3 as switching to a slightly newer phone of the same brand, like for example switching from iPhone X to iPhone 11 Pro. The feeling is awesome and you get major improvements but the user interface remains the same. And in both cases you have a great phone! Same in Vue.js, when you switch to Vue 3 you will be able to do more things with your new framework but everything you could do previously will continue to work.

And for making the switch, the Vue team will be releasing in-depth guides and a migration tool that will parse your application and guide you through the upgrade.

So don’t be afraid of Vue 3 and stop hesitating learning and using Vue 2 in 2020. Everybody uses Vue 2 in 2020! You won’t fall behind, you are not missing out, and your codebase is definitely not outdated. Keep your focus on developing amazing apps and when the Vue 3 ecosystem is ready for the migration we will all know it and we will have time in our turn to upgrade.

Learn Vue.js With Vue School

Vue 3 is coming to make our applications lighter, faster, and provide us with more tools that become needed in enterprise applications.

When is the Vue 3 Masterclass coming?

January 2021

The Vue School team have been intensively working on the Vue 3 Masterclass the past 5 months. The Vue 3 Masterclass is a complete remake of our signature course that was released some years ago. We’re going to build our beloved forum from scratch again. This time we will be using Vue 3 and all the latest and greatest ecosystem and other 3rd party libraries we need in order to build a modern Real-World application.

It was technically possible that we released the new course while Vue 3 or the ecosystem is experimental. But that’s not what the Masterclass is about. The goal is to teach you stable code and best practices for production. Not code that might change tomorrow or next month.

You can find the original Vue Masterclass here. The original course is developed with Vue 2 and the content is still relevant, you can use it at work today! Though, as the course is years old you will have to do some workarounds here and there which might be a bit annoying.

The Vue.js Masterclass 2 and 3 are included in the Vue School subscription!
That’s right, besides the massive amount of lessons you get at Vue School - with new lessons every week - you also get access to the Vue Masterclass. You can watch the original course today and the Vue 3 version in 2021 when we release it!

Looking forward to showing you what we’ve been working on and get to build together once again.

More information to come soon!

Bonus: Why does it take time for the ecosystem to be ready for Vue 3?

There are thousands official and community plugins, libraries, tools, and even frameworks that extend or give super powers to Vue applications.

Once Vue 3 is released, the entire ecosystem have to follow and develop a new major version to be compatible with Vue 3. The core (official) libraries are planed to release a vue 3 version by the end of 2020. But that’s just for the core libraries that are maintained by the Vue team. There are thousands of Open Source creators out there that have created great libraries for Vue.js we all use every day. What happens with them? They have to put in a lot of time and effort to create a new major version of their project where they code it, improve it, test it, write documentation, and repeat until it is ready to be used in production. And this is a big responsibility. Vue.js is used in a massive number of websites including some huge organisations like Microsoft, Apple, Google, and Nintendo to name a few.

The Vue 3 API for most Vue developers does not introduce breaking changes. But remember it is a complete re-write so plugin and framework developers actually do have to deal with breaking changes to upgrade their projects. So you can imagine the upgrade process and especially for complex library takes a tremendous amount of time.

And don’t forget, open source creators work on Open Source for free, and as many have full-time jobs they need to make time in their evenings and weekends to work on these upgrades. So if your company needs to have Vue 3 support for a specific library soon, you should consider supporting the maintainers via Patreon, Open Collective, or GitHub sponsors.

Learn Vue.js With Vue School

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK