Question presented to candidate: "You have never worked with our frontend stack before. In plain words, what is Vue.js, and which features make it useful for building a user interface?"
What a strong answer should cover:
- Vue is a progressive JavaScript framework for building user interfaces: you can add it to one widget through a script tag or build a whole single-page app with it.
- Declarative rendering: an HTML-based template describes what the screen should look like for the current state; Vue keeps the DOM in sync.
- Reactivity: state created with
ref()/reactive()is tracked, so changing it updates exactly the parts of the page that read it;computed()gives cached derived values. - Components and Single File Components (
.vuefiles with template, script and style) as the unit of reuse. - Built-in directives (
v-if,v-for,v-bind,v-on,v-model) and an official ecosystem: Vite tooling, Vue Router, Pinia, Vue Test Utils, Nuxt. - Under the hood, templates are compiled to render functions with a virtual DOM; current stable is Vue 3 (3.5.x), and Vue 2 is end of life.
Clarifying questions expected:
- "Are we adding Vue to an existing server-rendered page, or starting a new single-page app?"
- "Do you want the feature list, or how it compares with React or Angular?"
Code / implementation expected: Optional. A small component with reactive state, a computed value and a list is a good way to show the core features.