Charles Villard
Frontend Engineer, Hewlett-Packard Enterprise
đ Â https://www.charlesvillard.co
đŠ Â @charlesvillard.co
đ¶ Â @cdvillard
https://www.vuemastery.com/conferences/vuejs-live-2024/10-years-of-vue-the-past-and-the-future/
https://blog.vuejs.org/posts/vue-3-one-piece
https://www.monterail.com/stateofvue
v2.0
September 2016
v3.0
September 2020
February 2019
v2.6
Codebase scope/size
Time and budget
v2-locked dependencies
Service-level agreements
This talk won't make you
an expert on anything!
But you'll know where to look.
I guarantee it!
THEN
v2
NOW
v3
THEN
v2
NOW
v3
+
<!-- Vue v2 Development -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
<!-- Vue v2 Production -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.16"></script>
<!-- Vue v3 Global Build -->
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
petite-vue
https://github.com/vuejs/petite-vue
Subset of Vue 3 features optimized for progressive enhancement
<script src="https://unpkg.com/petite-vue"></script>
<script>
PetiteVue.createApp({
// exposed to all expressions
count: 0,
// getters
get plusOne() {
return this.count + 1
},
// methods
increment() {
this.count++
}
}).mount()
</script>
<!-- v-scope value can be omitted -->
<div v-scope>
<p>{{ count }}</p>
<p>{{ plusOne }}</p>
<button @click="increment">increment</button>
</div>
NOW
v3
Full system for rapid Vue.js development
https://cli.vuejs.org/
THEN
v2
create-vue
Official Vite-powered project scaffolding tool
NOW
v3
https://github.com/vuejs/create-vue
https://nitter.net/youyuxi/status/1902652712061395204#m
Established DX Patterns
Object.defineProperty
v-
 directiveshttps://v2.vuejs.org/
THEN
v2
// Hello.vue
<template>
<p>
{{ message }}
</p>
</template>
<script>
const app = new Vue({
el: "#app",
data: {
message: "Hello, VueConf.US!"
}
})
</script>
Full TypeScript Rewrite
https://vuejs.org/
// Hello-v3.vue
<script setup lang="ts">
import { ref } from 'vue';
const message = ref("Hello, VueConf.US!");
</script>
<template>
<p>
{{ message }}
</p>
</template>
NOW
v3
Backporting v3 features
Object.defineProperty
<script setup>
https://v2.vuejs.org/v2/guide/migration-vue-2-7
https://www.herodevs.com/blog-posts/what-it-really-takes-to-migrate-from-vue-2-to-vue-3
https://github.com/nasa/openmct
Vue tooling for VS Code
https://vuejs.github.io/vetur/
THEN
v2
https://youtu.be/05tNXJ-Kric
Comprehensive suite of language tooling for Vue.js development
NOW
v3
https://deepwiki.com/vuejs/language-tools
THEN
v2
NOW
v3
Debugging extension fo Vue
Monitor state, stores, and routes
https://devtools.vuejs.org/
https://devtools-v6.vuejs.org/
Vueâs official routing plugin
https://v3.router.vuejs.org/
THEN
v2
Vueâs official routing plugin, still.
NOW
v3
https://router.vuejs.org/
Type-safe router for Vue.js
https://router.kitbag.dev/
NOW
v3
State management pattern + library for Vue.js applications
https://vuex.vuejs.org/
THEN
v2
import { createApp } from 'vue'
import { createStore } from 'vuex'
// Create a new store instance.
const store = createStore({
state () {
return {
count: 0
}
},
mutations: {
increment (state) {
state.count++
}
}
})
const app = createApp({ /* your root component */ })
// Install the store instance as a plugin
app.use(store)
Type-safe store library for Vue.js
NOW
v3
https://pinia.vuejs.org/
// stores/counter.js
import { defineStore } from 'pinia'
export const useCounterStore = defineStore(
'counter',
{
state: () => {
return { count: 0 }
},
// could also be defined as
// state: () => ({ count: 0 })
actions: {
increment() {
this.count++
},
},
}
)
Framework-agnostic
asynchronous state management
NOW
v3
https://tanstack.com/query/latest/docs/framework/vue/overview
The data-fetching layer for Pinia
NOW
v3
https://pinia-colada.esm.dev/
https://youtu.be/Aybu-SnA34Q
https://youtu.be/SLAGCe3XK38
Opinionated framework for building scalable Vue applications
https://v2.nuxt.com/
THEN
v2
Modern rewrite of Nuxt based on Vite, Vue 3, and Nitro
NOW
v3
https://cli.vuejs.org/
https://vuepress.vuejs.org/
THEN
v2
https://gridsome.org/
https://vitepress.dev/
https://astro.build/
NOW
v3
THEN
v2
NOW
v3
Official testing utility library for Vue.js!
https://test-utils.vuejs.org/
https://v1.test-utils.vuejs.org/
https://www.vuejs.org
https://vueschool.io
https://vuemastery.com
https://frontendmasters.com
https://laracasts.com
https://bsky.app/profile/esm.dev/post/3lp7ldjp6zg2h
đ Â https://www.charlesvillard.co
đŠ Â @charlesvillard.co
đ¶ Â @cdvillard