LearnThatStack Ace your next interview
Frontend Development
Vue.js.
102 Qs 15 free
Change topic Change
Drill · questions

All questions

of 102
Beginner 24
01

How does Vue.js differ from React and Angular?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Vue vs React:

  • Vue has a gentler learning curve and more approachable syntax
  • Vue uses templates by default while React uses JSX
  • Vue has built-in state management (Vuex/Pinia) while React relies on external libraries
  • Vue provides more built-in features out of the box
    Vue vs Angular:
  • Vue is more lightweight and flexible than Angular
  • Angular is a full framework while Vue is progressive
  • Vue has simpler syntax and less boilerplate code
  • Angular uses TypeScript by default, Vue supports it optionally
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

02

What is the Vue instance and how do you create one?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

A Vue instance is the root of every Vue application. It's created using the createApp() function and contains the application's data, methods, and configuration.

import { createApp } from 'vue'
const app = createApp({
  data() {
    return {
      message: 'Hello Vue!'
    }
  },
  methods: {
    greet() {
      alert(this.message)
    }
  }
})
app.mount('#app')
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

03

Explain the concept of reactivity in Vue.js

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Reactivity in Vue.js means that when data changes, the DOM automatically updates to reflect those changes. Vue achieves this through a reactive system that tracks dependencies and triggers updates when data changes.
Vue 3 uses ES6 Proxies to implement reactivity, which allows it to detect property additions, deletions, and array mutations that weren't possible in Vue 2's Object.defineProperty approach.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

04

What happens in the `created` vs `mounted` lifecycle hooks?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

created:

  • Component instance is created
  • Data, computed properties, methods, and watchers are set up
  • DOM is not yet available
  • Good for: API calls, setting up data, initializing non-DOM related logic
    mounted:
  • Component is mounted to the DOM
  • DOM is fully available and accessible
  • Child components are also mounted
  • Good for: DOM manipulation, integrating third-party libraries, accessing DOM elements
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

05

What are the different types of data binding in Vue?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

1. Text Interpolation:

<span>{{ message }}</span>

2. Attribute Binding:

<div :id="dynamicId"></div>
<div v-bind:class="className"></div>

3. Two-way Binding:

<input v-model="message" />

4. Event Binding:

<button @click="handleClick">Click me</button>
<button v-on:click="handleClick">Click me</button>
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

06

Explain the difference between `v-show` and `v-if`

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

v-if:

  • Conditionally renders element (adds/removes from DOM)
  • Higher toggle cost
  • Lazy - doesn't render if initially false
  • Use when condition rarely changes
    v-show:
  • Always renders element, toggles CSS display property
  • Higher initial render cost
  • Always present in DOM
  • Use when toggling frequently
<div v-if="isVisible">Rendered conditionally</div>
<div v-show="isVisible">Always in DOM, visibility toggled</div>
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

07

How does `v-for` work and what are its best practices?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

v-for renders lists of elements based on source data:

<!-- Array iteration -->
<li v-for="item in items" :key="item.id">{{ item.name }}</li>
<!-- Object iteration -->
<li v-for="(value, key) in object" :key="key">{{ key }}: {{ value }}</li>
<!-- Number iteration -->
<span v-for="n in 10" :key="n">{{ n }}</span>

Best practices:

  • Always use :key with unique, stable identifiers
  • Avoid using index as key when list can change
  • Don't use v-for and v-if on the same element
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

08

Explain the concept of computed properties

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Computed properties are cached reactive values that update only when their dependencies change. They're declarative and automatically track their reactive dependencies.

computed: {
  fullName() {
    return this.firstName + ' ' + this.lastName
  },
  expensiveValue() {
    // This will only re-run when dependencies change
    return this.items.filter(item => item.price > 100)
  }
}

Benefits:

  • Caching for performance
  • Declarative and readable
  • Automatic dependency tracking
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

09

What's the difference between computed properties and methods?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Computed Properties:

  • Cached based on dependencies
  • Only re-evaluate when dependencies change
  • Should be pure functions (no side effects)
  • Accessed like properties
    Methods:
  • Execute every time they're called
  • Can have side effects
  • Called like functions
  • Good for event handlers and actions
computed: {
  reversedMessage() {
    return this.message.split('').reverse().join('')
  }
},
methods: {
  reverseMessage() {
    this.message = this.message.split('').reverse().join('')
  }
}
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

10

How do you define a component in Vue?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Global Registration:

app.component('my-component', {
  template: '<div>A custom component!</div>'
})

Local Registration:

import MyComponent from './MyComponent.vue'
export default {
  components: {
    MyComponent
  }
}

Single File Component (.vue):

<template>
  <div>{{ message }}</div>
</template>
<script>
export default {
  name: 'MyComponent',
  data() {
    return {
      message: 'Hello from component'
    }
  }
}
</script>
<style scoped>
div {
  color: blue;
}
</style>
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

11

What are props and how do you validate them?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Props are custom attributes used to pass data from parent to child components:

export default {
  props: {
    // Basic syntax
    title: String,
    // With validation
    age: {
      type: Number,
      required: true,
      validator(value) {
        return value >= 0
      }
    },
    // With default value
    message: {
      type: String,
      default: 'Hello World'
    },
    // Array or object defaults must use factory function
    tags: {
      type: Array,
      default: () => []
    }
  }
}

Prop validation types:

  • String, Number, Boolean, Array, Object, Date, Function, Symbol
  • Custom constructor functions
  • Array of types: [String, Number]
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

12

Explain the difference between props and data

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Props:

  • Data passed from parent component
  • Read-only (should not be mutated)
  • External data source
  • Validated by Vue
    Data:
  • Component's internal state
  • Mutable and reactive
  • Local to the component
  • Initialized in data() function
export default {
  props: ['message'],        // From parent
  data() {
    return {
      localMessage: ''       // Component's own data
    }
  }
}
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

13

How do you emit custom events from a child component?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Use $emit to send events from child to parent:

// Child component
export default {
  emits: ['customEvent'],    // Declare emitted events (Vue 3)
  methods: {
    handleClick() {
      this.$emit('customEvent', 'some data')
    }
  }
}
<!-- Parent template -->
<child-component @custom-event="handleCustomEvent" />
// Parent component
methods: {
  handleCustomEvent(data) {
    console.log('Received:', data)
  }
}
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

14

How do you use Pinia stores in components?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain
// In component
import { useCounterStore } from '@/stores/counter'
export default {
  setup() {
    const counter = useCounterStore()
    return {
      counter
    }
  }
}
<template>
  <div>
    <p>Count: {{ counter.count }}</p>
    <p>Double: {{ counter.double }}</p>
    <button @click="counter.increment">Increment</button>
  </div>
</template>

Destructuring with reactivity:

import { storeToRefs } from 'pinia'
const counter = useCounterStore()
const { count, double } = storeToRefs(counter)
const { increment } = counter
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

15

What is Vue Router and how do you set it up?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Vue Router is the official routing library for Vue.js applications. It enables navigation between different views/pages.
Setup:

import { createRouter, createWebHistory } from 'vue-router'
import Home from './views/Home.vue'
import About from './views/About.vue'
const routes = [
  { path: '/', component: Home },
  { path: '/about', component: About }
]
const router = createRouter({
  history: createWebHistory(),
  routes
})
// In main.js
app.use(router)

In template:

<template>
  <div>
    <router-link to="/">Home</router-link>
    <router-link to="/about">About</router-link>
    <router-view />
  </div>
</template>
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

16

How do you implement programmatic navigation?

Part of Pro
17

How do you compute values in the Composition API?

Part of Pro
18

What are Single File Components (SFCs) and their benefits?

Part of Pro
19

What is Vue DevTools and how does it help in development?

Part of Pro
20

How do you handle component naming conflicts?

Part of Pro
21

How do you implement a toggle functionality?

Part of Pro
22

How do you implement a search filter?

Part of Pro
23

What is the purpose of `ref` attribute?

Part of Pro
24

How do you implement conditional classes in Vue?

Part of Pro
Intermediate 57
25

What is the Virtual DOM and why does Vue use it?

Part of Pro
26

Explain the Vue component lifecycle hooks

Part of Pro
27

When would you use `beforeDestroy`/`beforeUnmount` hook?

Part of Pro
28

How do you access a component's parent or child components?

Part of Pro
29

What is the purpose of the `key` attribute in Vue?

Part of Pro
30

What is `v-model` and how does it work internally?

Part of Pro
31

How do watchers work in Vue and when should you use them?

Part of Pro
32

What are modifiers in Vue directives?

Part of Pro
33

What are slots and how do they work?

Part of Pro
34

What are scoped slots and when would you use them?

Part of Pro
35

How do you handle dynamic components in Vue?

Part of Pro
36

What is the `keep-alive` component and when would you use it?

Part of Pro
37

What are the different ways components can communicate in Vue?

Part of Pro
38

Explain the provide/inject pattern

Part of Pro
39

What are mixins and what are their limitations?

Part of Pro
40

How do you create and use composables in Vue 3?

Part of Pro
41

What is Vuex and when should you use it?

Part of Pro
42

Explain the Vuex store structure

Part of Pro
43

What are Vuex mutations and why must they be synchronous?

Part of Pro
44

How do Vuex actions differ from mutations?

Part of Pro
45

What is Pinia and how does it differ from Vuex?

Part of Pro
46

How do you handle dynamic routes in Vue Router?

Part of Pro
47

What are navigation guards and when would you use them?

Part of Pro
48

How do you handle nested routes in Vue Router?

Part of Pro
49

What are route meta fields and how are they used?

Part of Pro
50

What is the Composition API and why was it introduced?

Part of Pro
51

How does the `setup()` function work?

Part of Pro
52

Explain `ref` vs `reactive` in Vue 3

Part of Pro
53

What are lifecycle hooks in the Composition API?

Part of Pro
54

How do you watch data in the Composition API?

Part of Pro
55

What is `defineProps` and `defineEmits` in script setup?

Part of Pro
56

How do you access template refs in the Composition API?

Part of Pro
57

How do you implement lazy loading in Vue?

Part of Pro
58

How do you test Vue components?

Part of Pro
59

How do you test Vuex stores?

Part of Pro
60

How do you mock API calls in Vue component tests?

Part of Pro
61

What is the difference between shallow and mount in Vue Test Utils?

Part of Pro
62

What is Vite and how does it differ from Vue CLI?

Part of Pro
63

How do you configure Vue 3 with TypeScript?

Part of Pro
64

How does CSS scoping work in Vue?

Part of Pro
65

What is Nuxt.js and how does it extend Vue?

Part of Pro
66

How do you implement internationalization (i18n) in Vue?

Part of Pro
67

What is the difference between `nextTick` and `$nextTick`?

Part of Pro
68

What are Vue 3 Fragments and how do they work?

Part of Pro
69

How do you implement infinite scrolling in Vue?

Part of Pro
70

How do you implement drag and drop functionality?

Part of Pro
71

How do you implement real-time features with WebSockets?

Part of Pro
72

How do you implement form validation in Vue?

Part of Pro
73

What are the differences between Vue 2 and Vue 3?

Part of Pro
74

What are the best practices for Vue.js development?

Part of Pro
75

What is the purpose of `$forceUpdate()`?

Part of Pro
76

How do you create a global event bus in Vue 3?

Part of Pro
77

What is the difference between `v-if` and `v-for` priority?

Part of Pro
78

What is `$attrs` and `$listeners` in Vue?

Part of Pro
79

What are transition groups in Vue?

Part of Pro
80

How do you use script setup with TypeScript in Vue 3?

Part of Pro
81

What is Pinia and how does it compare to Vuex?

Part of Pro
Expert 21
82

What are the different ways to optimize Vue.js performance?

Part of Pro
83

How does Vue's reactivity system work under the hood?

Part of Pro
84

What is `v-memo` and when should you use it?

Part of Pro
85

What is virtual scrolling and how would you implement it?

Part of Pro
86

How do you handle memory leaks in Vue applications?

Part of Pro
87

What are render functions and when would you use them?

Part of Pro
88

How do you create custom directives in Vue?

Part of Pro
89

What are functional components and their use cases?

Part of Pro
90

How do you implement server-side rendering (SSR) with Vue?

Part of Pro
91

What are Web Components and how does Vue support them?

Part of Pro
92

How do you implement micro-frontends with Vue?

Part of Pro
93

What are the security considerations in Vue applications?

Part of Pro
94

How do you handle error boundaries in Vue?

Part of Pro
95

How do you optimize bundle size in Vue applications?

Part of Pro
96

What is Suspense in Vue 3 and how do you use it?

Part of Pro
97

How do you implement a plugin system in Vue?

Part of Pro
98

What are the performance implications of deep watching?

Part of Pro
99

How do you implement component composition patterns?

Part of Pro
100

How do you handle component testing with mocked dependencies?

Part of Pro
101

How do you migrate from Vue 2 to Vue 3?

Part of Pro
102

How do you implement advanced component composition patterns in Vue 3?

Part of Pro

No matches

Try a different filter or search term.

Pro · $10/mo

87 of 102 Vue.js answers are gated.

Full answers, code samples, AI explanations - simpler, deeper, or as an interactive diagram. Cancel anytime.

  • Full answers + code
  • AI explain - simpler, deeper, or visualized
  • 1,000 AI credits / month
  • Cancel anytime

Change topic

Pick a different technology or stack. Your current topic stays put until you choose a new one.

Technologies
No technologies match “”.
Cross-cutting topics
No topics match “”.
By role
Stacks & frameworks

MEAN

MongoDB, Express, Angular, Node.js

MERN

MongoDB, Express, React, Node.js

LAMP

Linux, Apache, MySQL, PHP

Django

Python Full-Stack Development

Ruby on Rails

Convention over Configuration

JAM

JavaScript, APIs, and Markup

Serverless on AWS

Serverless Architecture on AWS

Cross-cutting topics 43 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.

Flutter Mobile

Flutter Cross-Platform Mobile Development

Cross-cutting topics 44 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.

Spring Boot

Enterprise Java Development

.NET

Microsoft Ecosystem

Vue

Vue.js, Vite, TypeScript, Tailwind, Node.js

Go Backend

Golang, gRPC, PostgreSQL, Redis, RabbitMQ

FastAPI

Python, FastAPI, SQLAlchemy, PostgreSQL

React Native

React, TypeScript, Redux, Firebase

iOS Native

Swift, SwiftUI, UIKit, Firebase

Android Native

Java, Jetpack Compose, Firebase

Web3 / Ethereum

Solidity, Ethereum, Hardhat, Foundry

DevOps / Platform

Docker, Kubernetes, Terraform, CI/CD

Core SWE Interview Prep

Data structures, algorithms, OS, concurrency, networking, git
Big-O & Complexity Analysis Arrays, Strings & Hash Tables Linked Lists, Stacks & Queues Trees, BSTs & Heaps Graphs Sorting, Searching & Recursion Operating Systems Concurrency & Multithreading Networking for Developers Git & Version Control API Design 45 Distributed Systems Fundamentals 34

Cross-cutting topics 43 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.


Cross-cutting topics 45 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.