Thuta Learning
Vue.js
BasicWeb DevelopmentBeginner

What is Vue.js?

Vue.jsLesson 220 min

What you'll walk away with

  • Explain what Vue's "progressive framework" idea actually means
  • Tell declarative UI apart from component-based UI

Explain it simply

What is Vue.js?, in plain language

Vue automatically reflects changes in your JavaScript state back into the DOM. You can start small with a single file loaded via CDN, and as your app grows, scale it up with Single-File Components, a router, and a state store.

Problem → Why → Solution

The problem — why this concept matters

Changing a ref's value in JavaScript without using .value

A common mistake

Forgetting to add the mount target #app to your HTML

Core concept — understand how it works

Vue.js is a progressive JavaScript framework built around declarative rendering and a component model.

Mental model
  1. props or event
  2. component and template
  3. rendered Vue UI

Explain what Vue's "progressive framework" idea actually means

Core syntax or pattern

javascript
import { createApp, ref } from 'vue'

createApp({
  setup() {
    const message = ref('Hello Vue!')
    return { message }
  },
  template: '<h1>{{ message }}</h1>'
}).mount('#app')

Vue.js is a progressive JavaScript framework built around declarative rendering and a component model.

Read the code step by step

  1. props or eventimport { createApp, ref } from 'vue'

    Vue automatically reflects changes in your JavaScript state back into the DOM. You can start small with a single file loaded via CDN, and as your app grows, scale it up with Single-File Components, a router, and a state store.

  2. component and templatereturn { message }

    Vue.js is a progressive JavaScript framework built around declarative rendering and a component model.

  3. rendered Vue UI}).mount('#app')

    Apply What is Vue.js? in a small example and test normal, edge, and failure cases.

Execution flow
  1. props or event
  2. component and template
  3. rendered Vue UI

Success

Explain what Vue's "progressive framework" idea actually means

Failure

Changing a ref's value in JavaScript without using .value

Let's break it down simply

Vue automatically reflects changes in your JavaScript state back into the DOM. You can start small with a single file loaded via CDN, and as your app grows, scale it up with Single-File Components, a router, and a state store.

javascript
import { createApp, ref } from 'vue'

createApp({
  setup() {
    const message = ref('Hello Vue!')
    return { message }
  },
  template: '<h1>{{ message }}</h1>'
}).mount('#app')
You should see
Hello Vue!

Try it yourself

Change message to include your own name and render it in the browser.

Vue.js Guide — Vue.js

Real-world usage

How to apply it in a real project

Apply What is Vue.js? in a small example and test normal, edge, and failure cases.

Mini challenge

Build it yourself

Change message to include your own name and render it in the browser.

  • Rebuild the example without copying it
  • Test a normal input and an edge case
  • Predict the compiler or output result before running it
javascript
import { createApp, ref } from 'vue'

createApp({
  setup() {
    const message = ref('Hello Vue!')
    return { message }
  },
  template: '<h1>{{ message }}</h1>'
}).mount('#app')

Expected: Explain what Vue's "progressive framework" idea actually means

Show hint

Apply What is Vue.js? in a small example and test normal, edge, and failure cases.

Quick quiz 1 / 3

What best describes the core idea of What is Vue.js??

Quick quiz 2 / 3

Which mistake should you avoid first?

Quick quiz 3 / 3

How should this be applied in a real project?

What to remember

  • props or event → component and template → rendered Vue UI
  • Vue.js is a progressive JavaScript framework built around declarative rendering and a component model.
  • Changing a ref's value in JavaScript without using .value
  • Apply What is Vue.js? in a small example and test normal, edge, and failure cases.

Vue.js Guide — Vue.js

Easy traps

  • Changing a ref's value in JavaScript without using .value
  • Forgetting to add the mount target #app to your HTML

Exercise

Change message to include your own name and render it in the browser.

You'll know it worked when: Hello Vue!

Updated on

Progress is saved only in this browser on this device. It isn't synced to other devices.

Report a problem with this lessonOpens your email app with this lesson's address filled in — nothing is sent until you send it.

What is Vue.js? | Thuta Learning