Interview Q&A · questions with model answers

Vue.js Developer Interview Questions

Part of the study plan for: Frontend Engineer

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. Most asked Why does v-for need a key, and why should it not be the index?

    The key lets Vue match list items to existing DOM elements and component instances when the list changes, so it can move them instead of patching in place. A stable unique ID keeps each item's state…

  2. Most asked Why does destructuring sometimes lose reactivity in Vue, and how do you avoid it?

    Reactivity is tracked through property access on a proxy or .value on a ref. Destructuring a reactive() object, a store, or (before Vue 3.5) props copies the current values into plain variables,…

  3. Why should you not use v-if and v-for on the same element?

    In Vue 3, v-if has higher precedence than v-for on the same element, so the condition cannot see the loop variable (it errors or behaves unexpectedly). In Vue 2 the precedence was the opposite. Both…

Was this page helpful?

Report a mistake