Vue.js is an open-source, progressive JavaScript framework for building user interfaces and single-page applications. The current stable version, 3.5.32, reflects ongoing development with patch releases occurring as needed, and minor versions, which introduce new features, typically released every 3-6 months following beta phases. Vue 3 significantly improved performance, tree-shaking, and TypeScript integration, while introducing the Composition API for enhanced reusability and organization of component logic. It maintains a progressive adoption strategy, allowing developers to integrate it incrementally, and features a highly efficient virtual DOM, component-based architecture, and reactive data binding, making it a flexible and powerful choice for modern web development.
npm install vueVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a minimal Vue 3 application using the Composition API, `ref` for reactivity, `onMounted` lifecycle hook, and a simple template, then mounts it to an HTML element.
Refer to the official Vue 3 Migration Guide. For large projects, consider using `@vue/compat` (migration build) for a gradual transition, then address warnings before removing it.
Use `ref` for primitives and `reactive` for objects. Always access/mutate `ref` values with `.value`. For destructuring `reactive` objects while preserving reactivity, use `toRefs` or `toRef` utilities.
Instead of `Vue.component('my-component', ...)`, use `const app = createApp(App); app.component('my-component', ...);`.Update custom components to expect `modelValue` as a prop and emit `update:modelValue` for two-way binding. For multiple `v-model`s, use `v-model:argumentName` syntax.
Add an `emits` array/object to your component options or use `const emit = defineEmits(['my-event'])` in `<script setup>`.
Use `ref(0)` for primitive values. For objects, use `reactive({ count: 0 })`.Emit an `update:propName` event from the child component for the parent to update the prop, or create a local copy of the prop data if it needs to be modified within the child.
Ensure your component has a `<template>` block in a SFC, or a `template` string/render function in its definition. If using a buildless setup, use the full Vue build that includes the template compiler.
Check the component name for typos. Ensure the component is imported and then registered either globally (`app.component('ComponentName', MyComponent)`) or locally within the parent component's `components` option.