Vue 3 cheatsheet
Vue 3: Router and Pinia
5 common Vue 3 tasks.
Read the current route
Access route params and query values.
const route = useRoute();
console.log(route.params.id);
Define a store
Create a store with state and actions using the setup syntax.
export const useCounterStore = defineStore("counter", () => {
const count = ref(0);
const increment = () => count.value++;
return { count, increment };
});