Vue Tutorial

What is Vue Tutorial?” — I think you’re asking for a detailed beginner-friendly tutorial on Vue.js (the popular JavaScript framework), explained step by step with lots of examples, the way a real human teacher would do it in 2026.

Vue.js (usually just called Vue) is currently at version 3 (Vue 3), and that’s what almost everyone should learn in 2025–2026. Vue 3 is modern, fast, smaller, and has two main styles:

  • Options API → classic, very beginner-friendly
  • Composition API → modern, more flexible (recommended for new projects)

Today I’ll teach you using the Composition API (the future-proof way), but I’ll also show the Options version so you understand both.

Step 0 – Quick “Why Vue?” (30-second motivation)

  • Super easy syntax (feels like enhanced HTML + JS)
  • You can start with one <script> tag — no build tools needed at first
  • Excellent for building interactive UIs (forms, dashboards, SPAs)
  • Great performance + small bundle size
  • Huge community + excellent docs → https://vuejs.org

Ready? Let’s start from zero-setup playground → then move to real project.

Step 1: Hello World – No build tools (CDN way – perfect for learning)

Create a file called index.html and paste this:

HTML

Open this file in browser → you should see:

Hello Vue Beginner! 🎉 [Change Message] button

Key things we learned here already:

  • {{ message }} → interpolation (like mustache syntax)
  • @click → shorthand for v-on:click (event listener)
  • ref() → makes a reactive variable
  • .value → you must use .value when changing/reading ref in JS (but not in template!)
  • setup() → heart of Composition API
  • createApp({…}).mount(‘#app’) → creates & mounts Vue app

Step 2: Let’s compare → Options API version (still very common)

Same example, but old-school style:

HTML

Template stays exactly the same.

Many old tutorials & jobs still use Options API → good to recognize both.

Step 3: Reactive counter – most important mini example

Update the <div id=”app”> part:

HTML

And script:

JavaScript

You need to add:

HTML

Better: use full build (already included in first example).

Important rule (2025–2026):

  • ref() → for primitives (number, string, boolean)
  • reactive() → for objects/arrays
JavaScript

Step 4: v-bind, v-if, v-for – the core directives

Let’s make a small todo list (classic example)

HTML

Style (add in <head>):

CSS

Script:

JavaScript

Directives we used:

  • v-model → two-way binding (input ↔ data)
  • v-for=”(item, index) in items” + :key → loop (always use :key!)
  • :class=”{ done: todo.done }” → class binding
  • v-if / v-else → conditional rendering

Step 5: What to do next (realistic 2026 learning path)

  1. Finish the official interactive tutorial → https://vuejs.org/tutorial (do all 15 steps)
  2. Build 3–5 small projects using CDN or Vite:
    • Weather card
    • Shopping cart
    • Markdown previewer
    • Movie search app (fetch API)
  3. Learn Components (very important!)
    • How to create <TodoItem />, props, emits
  4. Setup real project → Vite is king in 2026
Bash
  1. Then learn (in this order):
  • Props + emits
  • <script setup> (huge time-saver)
  • Pinia (modern store instead of Vuex)
  • Vue Router
  • Teleport, Suspense, <Transition>

Take it slow — do one concept → build mini demo → repeat.

Any part you want me to explain more deeply (components, props, Pinia, forms, routing…)? Just tell me — I’ll go as detailed as you want.

Happy coding! 🚀 You’ve got this 💙