By now you're probably aware we got a shiny new version of Vue (Vue 3.0 or "One Piece").
Evan You announced it back in Fall 2018 at Vue.js London – 2 years before its official release in September 2020.
We're going to collect all valuable infos and resources in this article for you, so you'll be up-to-date about the release process and your first steps with Vue 3.
Vue 3 has officially been released on 18 September 2020, and is the new default version as of 7 February 2022 🎉.
While we have all been awaiting the switch from @next to default, there has been a lot of community-driven work behind it to keep the experience of the ecosystem as seamless as it always has been with Vue 2.
(Successfully, by the way!). All important subprojects including the Vue Devtools, Vue Router, Vue Test Utils and others are Vue 3-ready and we've got shiny new docs as well!
- There are also a lot of new and improved tools around to enhance your Vue 3 development experience - like simpler state management with Pinia (read more about state management options for Vue 3 here!), or a build toolchain powered by the blazing fast Vite.
- You can read all about the background of the release process and new tooling in Evan You's article Vue 3 as the New Default.
- There's also a migration guide available, highlighting changes for Vue 2 users.
- As Evan You summarized it, Vue 3 is faster, smaller, more maintainable and it's easier to target native. One of the most significant changes is that a new API that will allow for a function-based way of writing your component, inspired by React Hooks.
- It lets you encapsulate logic into "composition functions" and reuse that logic across components.
- Read the API reference for more info.
- Yes, this actually changes the way we use Vue (if we decide to use the Composition API).
- However, it won't break anything in your Vue 2.x apps, as Vue 3 is still 100% compatible with the current syntax / the options-based API.
- Personally, we think that the Composition API will bring us a lot of flexibility, and lead to better structured code as well as scalability.
- If you want to start experimenting within your Vue 2 apps, the new Composition API is available for 2.x as a plugin as well.
- There are also already some Composition API utility libraries available:.