One Year Into Vue 3

Rate this content
Bookmark

Vue 3 may still sound new to many users, but it's actually been released for over a year already. How did Vue 3 evolve during this period? Why did it take so long for the ecosystem to catch up? What did we learn from this process? What's coming next? We will discuss these questions in this talk!

This talk has been presented at Vue.js London Live 2021, check out the latest edition of this JavaScript Conference.

FAQ

Vue 3 was released on September 18th, 2020.

Vue 3.2 introduced significant improvements, including script setup for better ergonomics in single file components, improved IDE support via the Vola extension, and major performance enhancements for the reactivity system and rendering.

The transition to make Vue 3 the default version was delayed due to the need for core libraries to move out of beta, the new DevTools extension to be ready, and improved IDE support and tooling. Additionally, major ecosystem projects like Nuxt and Vuetify required time to develop Vue 3 compatible versions.

Vite is a new build tool that improves development experience with fast server start-up and hot module replacement performance. It has become the recommended tooling for Vue 3, with over 1 million monthly NPM downloads and active use in production projects.

Vue 3 is approximately 90% backward compatible with Vue 2. While it retains most framework concepts and APIs, some changes such as the switch to proxies for the reactivity system and changes in the virtual DOM format were necessary for improvements. These changes have made migration more challenging for existing projects.

Yes, the Options API will continue to be supported in Vue 3. It remains a viable option for building UI components, particularly for simpler projects or teams not using TypeScript.

The Vue 3 Migration Build, introduced in version 3.1, helps projects incrementally migrate to Vue 3. It maintains Vue 2 behavior while supporting Vue 3 features, making the transition smoother.

Pinia is a state management library designed with better TypeScript support and simpler API compared to Vuex. It aligns with Vue 3's reactivity system, providing a more predictable and less verbose state management solution.

Vue 3 offers enhanced TypeScript integration, including the ViewTSC tool for type checking Vue components alongside TS files. The script setup and ref transform RFC further improve the ergonomics of using TypeScript in Vue projects.

Several UI component frameworks are stable for Vue 3, including Quasar 2, Naive UI, PrimeVue, Element Plus, and Ant Design Vue. Vuetify is currently in alpha and expected to reach beta soon.

Evan You
Evan You
20 min
20 Oct, 2021

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Vue 3 has seen significant adoption and improvements in performance, bundle size, architecture, and TypeScript integration. The ecosystem around Vue 3 is catching up, with new tools and frameworks being developed. The Vue.js.org documentation is undergoing a complete overhaul. PNIA is emerging as the go-to state management solution for Vue 3. The options API and composition API are both viable options in Vue 3, with the choice depending on factors such as complexity and familiarity with TypeScript. Vue 3 continues to support CDN installation and is recommended for new projects.
Available in Español: Un Año en Vue 3

1. Introduction to Vue 3 and its Challenges

Short description:

Today, I'll be talking about what's been going on after one year of Vue 3's release, what has changed, what was shipped, and some of the lessons we've learned along the way. Vue 3 has crossed 1.2 million downloads per month. We intentionally opted for a soft launch strategy to allow early adopters to start using Vue 3 while giving us time to stabilize core and give the ecosystem the time to catch up. The main issue that caused the ecosystem around Vue 3 to move slower is the breaking changes between Vue 2 and Vue 3.

Hello, everyone. Evan here, and thanks for tuning into Vue.js Live. Today, I'll be talking about what's been going on after one year of Vue 3's release, what has changed, what was shipped, and some of the lessons we've learned along the way.

And most importantly, I'll also talk about what's coming next. Vue 3 was released on September 18th, 2020. It's crazy to think that it's been out for over a year already. Over this past year, we shipped another two minor versions, 3.1 and 3.2. 3.1 was mostly focused on the migration build, and 3.2, which we'll talk about a bit later, shipped a ton of new improvements. And in between that, we had 52 patch and pre-release versions.

Today, Vue 3 has crossed 1.2 million downloads per month. But many of you are probably wondering, why haven't we switched vuejs.org and npm tags to default to Vue 3 yet? The short answer is, it will happen very, very soon. The longer answer is, well, it was planned, but only to some extent. When Vue 3 was first released, we knew it wasn't ready for instant mass adoption, most notably, some core libraries were still in beta, the new DevTools extension wasn't ready, and IDE support and the tooling story were both lacking. In addition, major ecosystem projects like Nuxt and Vuetify also needed time to come up with a Vue 3 compatible version. So we intentionally opt for a soft launch strategy. This would allow early adopters to start using Vue 3, while giving us time to stabilize core and give the ecosystem the time to catch up.

But we have to admit, this soft launch took much longer than we had hoped. Here I'm going to be completely honest and discuss some of the lesson that we have learned. The main issue that caused the ecosystem around Vue 3 to move slower is the breaking changes between Vue 2 and Vue 3. Because of breaking changes, it was challenging for existing projects to migrate. With fewer end users moving to Vue 3, library authors also had weaker incentives to upgrade their libraries to support Vue 3. And because many libraries did not support Vue 3, end users were unable to upgrade their projects. So, you see we're in a kind of deadlock here. This was addressed to some extent via the migration build. But it was also shipped a bit late, right? It was shipped in July 2020, July 2021. So much later than we had hoped. In an ideal world, we obviously wanted to make Vue 3 100% backwards compatible. However, in reality, it involves some extremely difficult trade-offs. Imagine reengineering a propeller into a jet while it's flying. Well, maybe that's a bit too exaggerated, but let me dive a bit deeper into this.

2. Considerations for Major Updates in Vue 3

Short description:

Major updates in a framework are typically done once every few years to correct architectural design flaws, introduce new capabilities, and shed technical debt. However, retaining full backwards compatibility becomes prohibitively expensive as it compounds with every major change. We opted for a trade-off in Vue 3, keeping the majority of concepts and APIs intact while introducing new capabilities. Although some internals have changed, we achieved major updates in performance, bundle size, architecture, maintainability, and TypeScript integration. Small breaking changes were necessary for these improvements but made upgrading challenging for projects relying on Vue 2's internal behavior.

What kind of updates do we consider major? Note that I am not talking about a SemVer major. I'm talking about something that we typically only do to a framework maybe once every few years, right? The common reasons for such major updates include, first, to correct architectural design flaws. Second, to introduce fundamental new capabilities, and three, to shed technical debt of the existing architecture. Note, these usually involves mass refactoring or even ground-up rewriting, which was the case for view three.

The common traits of these core reasons are that they are extremely expensive to do in an incremental fashion, right? Because some of the issues are rooted in the architecture and without overhauling the architecture, some of the improvements were simply not possible in the first place. So, doing such big updates while retaining fully backwards compatibility is sometimes just prohibitively expensive to do, right? Why, because full backwards compatibility is a burden that compounds with every major new change introduced. The more ambitious the new changes are, the more technical debt will incur during the process.

In the long run, it will make the process even harder, adding new features, much harder. And most importantly, it becomes more and more costly to maintain software in the long run. Now on the other hand, we can reduce the scope of changes in order to make things more feasible, but this also results in less ambitious improvements, fewer possibilities explored and potentially stagnation. So it's almost like there are a bunch of knobs that you can try to turn, but when you turn one of them, the other ones will move in reaction to the one you're turning.

So, here I visualized some of the factors that we have to consider while doing major updates into four knobs, right? These are backwards compatibility, how easy it is to upgrade, the cost to implement and maintain the changes and maintain it for the long run, and finally, the level of improvements these changes can bring about. So, in the case of Vue 3, the example is if we turn the backwards compatibility to 100%, this will make it extremely easy to upgrade, but it'll also significantly increase the implementation and maintenance costs. And if we try to push the scale of improvement up to 100% at the same time, it will drive up the cost to nearly infeasible scale. Now, if we turn the compatibility knob down a little bit to 90%, we can now have both reasonable cost and somewhat major improvements, but user upgrade will suffer, right? It will become more difficult to upgrade.

This essentially sums up the trade-offs that we have opted for in Vue 3, right? We tried to keep the majority of the framework concepts and APIs intact while introducing new capabilities. So the API is 90% compatible, it's not 100% compatible. Most importantly, some of the internals have changed, right? But we were able to bring major updates in almost every aspect from performance to bundle size to internal architecture, long-term maintainability, TypeScript integration, right? It's an improvement across the board. Unfortunately, we also had to introduce some of the small breaking changes. Many of the public API changes are now covered in the compact build. However, some of the exchanges are more fundamental, for example, the switch from using ES5 getter-setters to proxies for the reactivity system or changing the underlying virtual DOM format. These changes were necessary for the level of improvements that we were aiming for. However, they also made it more challenging for existing projects to upgrade, especially apps with external dependencies that rely on Vue 2's internal behavior. This is the biggest blocker that we have seen in practice.

Now, I'm not trying to look for excuses by talking about all this. Looking back, we probably could have done some things a lot better, especially with the breaking changes to make the upgrade process smoother. We could have introduced a compact build earlier and we definitely should have worked on the new docs earlier as well. But ultimately, I still believe making Vue 3 100% backwards compatible, especially with other libraries that relied on Vue 2's internal behavior, is something that was just too costly to commit to. We won't be able to get the level of maintainability and the level of improvements that we want, that we have right now at the same time, if we commit to 100% backwards compatibility. So, enough about the breaking changes, but now let's talk about something more optimistic.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Everything Beyond State Management in Stores with Pinia
Vue.js London Live 2021Vue.js London Live 2021
34 min
Everything Beyond State Management in Stores with Pinia
Top Content
State management is not limited to complex applications and transitioning to a store offers significant benefits. Pinia is a centralized state management solution compatible with Vue 2 and Vue 3, providing advanced devtools support and extensibility with plugins. The core API of Pinia is similar to Vuex, but with a less verbose version of stores and powerful plugins. Pinia allows for easy state inspection, error handling, and testing. It is recommended to create one file per store for better organization and Pinia offers a more efficient performance compared to V-rex.
Welcome to Nuxt 3
Vue.js London Live 2021Vue.js London Live 2021
29 min
Welcome to Nuxt 3
Top Content
Nux3 has made significant improvements in performance, output optimization, and serverless support. Nuxt Bridge brings the Nitro engine for enhanced performance and easier transition between Nuxt 2 and Nuxt Read. Nuxt 3 supports Webpack 5, Bytes, and Vue 3. NextLab has developed brand new websites using Docus technology. Nuxt.js is recommended for building apps faster and simpler, and Nuxt 2 should be used before migrating to Nuxt 3 for stability. DOCUS is a new project that combines Nuxt with additional features like content modules and an admin panel.
Utilising Rust from Vue with WebAssembly
Vue.js London Live 2021Vue.js London Live 2021
8 min
Utilising Rust from Vue with WebAssembly
Top Content
In this Talk, the speaker demonstrates how to use Rust with WebAssembly in a Vue.js project. They explain that WebAssembly is a binary format that allows for high-performance code and less memory usage in the browser. The speaker shows how to build a Rust example using the WasmPack tool and integrate it into a Vue template. They also demonstrate how to call Rust code from a Vue component and deploy the resulting package to npm for easy sharing and consumption.
Vue: Feature Updates
Vue.js London 2023Vue.js London 2023
44 min
Vue: Feature Updates
Top Content
Watch video: Vue: Feature Updates
The Talk discusses the recent feature updates in Vue 3.3, focusing on script setup and TypeScript support. It covers improvements in defining props using imported types and complex types support. The introduction of generic components and reworked signatures for defined components provides more flexibility and better type support. Other features include automatic inference of runtime props, improved define emits and defined slots, and experimental features like reactive props destructure and define model. The Talk also mentions future plans for Vue, including stabilizing suspense and enhancing computer invalidations.
Local State and Server Cache: Finding a Balance
Vue.js London Live 2021Vue.js London Live 2021
24 min
Local State and Server Cache: Finding a Balance
Top Content
This Talk discusses handling local state in software development, particularly when dealing with asynchronous behavior and API requests. It explores the challenges of managing global state and the need for actions when handling server data. The Talk also highlights the issue of fetching data not in Vuex and the challenges of keeping data up-to-date in Vuex. It mentions alternative tools like Apollo Client and React Query for handling local state. The Talk concludes with a discussion on GitLab going public and the celebration that followed.
Making Magic: Building a TypeScript-First Framework
TypeScript Congress 2023TypeScript Congress 2023
31 min
Making Magic: Building a TypeScript-First Framework
Top Content
Daniel Rowe discusses building a TypeScript-first framework at TypeScript Congress and shares his involvement in various projects. Nuxt is a progressive framework built on Vue.js, aiming to reduce friction and distraction for developers. It leverages TypeScript for inference and aims to be the source of truth for projects. Nuxt provides type safety and extensibility through integration with TypeScript. Migrating to TypeScript offers long-term maintenance benefits and can uncover hidden bugs. Nuxt focuses on improving existing tools and finds inspiration in frameworks like TRPC.

Workshops on related topic

Vue3: Modern Frontend App Development
Vue.js London Live 2021Vue.js London Live 2021
169 min
Vue3: Modern Frontend App Development
Top Content
Featured WorkshopFree
Mikhail Kuznetsov
Mikhail Kuznetsov
The Vue3 has been released in mid-2020. Besides many improvements and optimizations, the main feature of Vue3 brings is the Composition API – a new way to write and reuse reactive code. Let's learn more about how to use Composition API efficiently.

Besides core Vue3 features we'll explain examples of how to use popular libraries with Vue3.

Table of contents:
- Introduction to Vue3
- Composition API
- Core libraries
- Vue3 ecosystem

Prerequisites:
IDE of choice (Inellij or VSC) installed
Nodejs + NPM
Monitoring 101 for React Developers
React Summit US 2023React Summit US 2023
107 min
Monitoring 101 for React Developers
Top Content
WorkshopFree
Lazar Nikolov
Sarah Guthals
2 authors
If finding errors in your frontend project is like searching for a needle in a code haystack, then Sentry error monitoring can be your metal detector. Learn the basics of error monitoring with Sentry. Whether you are running a React, Angular, Vue, or just “vanilla” JavaScript, see how Sentry can help you find the who, what, when and where behind errors in your frontend project. 
Workshop level: Intermediate
Using Nitro – Building an App with the Latest Nuxt Rendering Engine
Vue.js London Live 2021Vue.js London Live 2021
117 min
Using Nitro – Building an App with the Latest Nuxt Rendering Engine
Top Content
Workshop
Daniel Roe
Daniel Roe
We'll build a Nuxt project together from scratch using Nitro, the new Nuxt rendering engine, and Nuxt Bridge. We'll explore some of the ways that you can use and deploy Nitro, whilst building a application together with some of the real-world constraints you'd face when deploying an app for your enterprise. Along the way, fire your questions at me and I'll do my best to answer them.
Going on an adventure with Nuxt 3, Motion UI and Azure
JSNation 2022JSNation 2022
141 min
Going on an adventure with Nuxt 3, Motion UI and Azure
WorkshopFree
Melanie de Leeuw
Melanie de Leeuw
We love easily created and deployed web applications! So, let’s see what a very current tech stack like Nuxt 3, Motion UI and Azure Static Web Apps can do for us. It could very well be a golden trio in modern day web development. Or it could be a fire pit of bugs and errors. Either way it will be a learning adventure for us all. Nuxt 3 has been released just a few months ago, and we cannot wait any longer to explore its new features like its acceptance of Vue 3 and the Nitro Engine. We add a bit of pizzazz to our application with the Sass library Motion UI, because static design is out, and animations are in again.Our driving power of the stack will be Azure. Azure static web apps are new, close to production and a nifty and quick way for developers to deploy their websites. So of course, we must try this out.With some sprinkled Azure Functions on top, we will explore what web development in 2022 can do.
TresJS create 3D experiences declaratively with Vue Components
Vue.js London 2023Vue.js London 2023
137 min
TresJS create 3D experiences declaratively with Vue Components
Workshop
Alvaro Saburido
Alvaro Saburido
- Intro 3D - Intro WebGL- ThreeJS- Why TresJS- Installation or Stackblitz setup - Core Basics- Setting up the Canvas- Scene- Camera- Adding an object- Geometries- Arguments- Props- Slots- The Loop- UseRenderLoop composable- Before and After rendering callbacks- Basic Animations- Materials- Basic Material- Normal Material- Toon Material- Lambert Material- Standard and Physical Material- Metalness, roughness - Lights- AmbientLight- DirectionalLight- PointLights- Shadows- Textures- Loading textures with useTextures- Tips and tricks- Misc- Orbit Controls- Loading models with Cientos- Debugging your scene- Performance
Building Vue forms with VeeValidate
Vue.js London Live 2021Vue.js London Live 2021
176 min
Building Vue forms with VeeValidate
Workshop
Abdelrahman Awad
Abdelrahman Awad
In this workshop, you will learn how to use vee-validate to handle form validation, manage form values and handle submissions effectively. We will start from the basics with a simple login form all the way to using the composition API and building repeatable and multistep forms.

Table of contents:
- Introduction to vee-validate
- Building a basic form with vee-validate components
- Handling validation and form submissions
- Building validatable input components with the composition API
- Field Arrays and repeatable inputs
- Building a multistep form
Prerequisites:
VSCode setup and an empty Vite + Vue project.