Vue.js Interview Questions
Reactivity, Options vs Composition API, ref & reactive, computed & watchers, directives, components, slots, lifecycle hooks, Vue Router and Pinia state.
61 questions
Popular Searches
1. What is Vue.js and how does it differ from React and Angular?
easyFundamentals 6 mins2. What is the Vue instance and how does the application lifecycle work?
mediumLifecycle 7 mins3. What are Vue components and how do you register them globally vs locally?
easyComponents 6 mins4. What is the difference between the Options API and the Composition API in Vue?
mediumCore Concepts 7 mins5. What is reactivity in Vue and how does the reactivity system work under the hood?
hardReactivity 8 mins6. What is the difference between ref and reactive in Vue 3?
mediumReactivity 6 mins7. What are computed properties in Vue and how do they differ from methods?
easyReactivity 6 mins8. What are watchers in Vue and when should you use watch vs watchEffect?
mediumReactivity 7 mins9. What is two-way binding in Vue and how does v-model work?
easyForms 6 mins10. What is the difference between v-if and v-show in Vue?
easyDirectives 6 mins11. How does list rendering with v-for work and why is the key attribute important?
easyDirectives 6 mins12. What are props in Vue and how does one-way data flow work?
easyComponents 6 mins13. How do child components emit events to parents in Vue?
easyComponent Communication 6 mins14. What are slots in Vue and how do named and scoped slots work?
mediumComponents 7 mins15. What are Vue lifecycle hooks and in what order do they run?
mediumLifecycle 7 mins16. What is the difference between provide/inject and props in Vue?
mediumComponent Communication 7 mins17. What is Vue Router and how does client-side routing work?
mediumRouting 7 mins18. What are navigation guards in Vue Router?
mediumRouting 7 mins19. What is Vuex/Pinia and how does centralized state management work in Vue?
mediumState Management 6 mins20. What is the difference between Vuex and Pinia?
mediumState Management 6 mins21. What are Vue directives and how do you create a custom directive?
mediumDirectives 6 mins22. What is the virtual DOM in Vue and how does the diffing algorithm work?
mediumRendering 7 mins23. What are Vue mixins and why does the Composition API often replace them?
mediumComposition API 7 mins24. How does teleport work in Vue 3?
easyBuilt-in Components 6 mins25. What is a Vue single-file component (SFC) and how is it structured?
easyComponents 6 mins26. How does scoped CSS work in Vue single-file components?
mediumStyling 7 mins27. What is the difference between dynamic and async components in Vue?
mediumComponents 7 mins28. How do you optimize the performance of a Vue application?
mediumPerformance 7 mins29. What is nextTick in Vue and when do you need it?
mediumReactivity 6 mins30. What are the key differences between Vue 2 and Vue 3?
mediumFundamentals 7 mins31. When should you use shallowRef, shallowReactive and markRaw in Vue 3?
hardReactivity Internals 8 mins32. How do you find and fix memory leaks in a Vue application?
hardDebugging 9 mins33. What causes hydration mismatch errors in server-rendered Vue and how do you fix them?
hardSSR 9 mins34. How does Suspense work in Vue 3 and what are its caveats?
hardAsync Rendering 9 mins35. How do template refs and defineExpose work with <script setup>?
mediumComponent API 8 mins36. How do you test Vue components with Vue Test Utils?
mediumTesting 9 mins37. What are toRef, toRefs and customRef, and when would you use each?
hardReactivity Internals 9 mins38. How does KeepAlive work and when does caching a component cause bugs?
hardBuilt-in Components 9 mins39. What do v-memo and v-once do, and when are they worth using?
hardRendering Performance 8 mins40. How do you handle errors globally in a Vue application?
mediumError Handling 8 mins41. How do you type props, emits and generic components in Vue with TypeScript?
hardTypeScript 9 mins42. How do you prevent XSS and other client-side vulnerabilities in a Vue app?
hardSecurity 9 mins43. Why does destructuring a reactive object lose reactivity, and how do you keep it?
mediumReactivity Internals 8 mins44. How does computed caching work in Vue, and when does it mislead you?
hardReactivity Internals 9 mins45. What do the pre, post and sync watcher flush modes do in Vue?
hardScheduler and Timing 9 mins46. How do you write a Vue composable that cleans up after itself?
mediumComposition API 8 mins47. Why do lifecycle hooks and inject stop working after an await in script setup?
hardComposition API 8 mins48. How do you type provide and inject safely with InjectionKey?
mediumTypeScript 8 mins49. How do you support v-model arguments and custom modifiers on a component?
mediumComponent API 8 mins50. Why does a Vue list re-render more than expected when one row changes?
hardRendering and Performance 9 mins51. How do custom directive hooks map to the component lifecycle, and where do they leak?
hardDirectives 8 mins52. Why does a component not reload when only a route param changes?
mediumVue Router 8 mins53. How does route-level code splitting work in Vue, and what does it cost?
mediumVue Router 8 mins54. How do you write a navigation guard that waits for authentication to resolve?
hardVue Router 9 mins55. Why do you need storeToRefs when destructuring a Pinia store?
mediumPinia 7 mins56. How do you keep Pinia state from leaking between requests in SSR?
hardSSR 9 mins57. How do you share state across components with effectScope instead of a store?
hardComposition API 9 mins58. How do you use Vue Devtools to find out why an interaction is slow?
mediumDebugging 8 mins59. How do you restore scroll position and list state on back navigation in Vue?
hardVue Router 9 mins60. When should you use a deep watcher in Vue, and what does it cost?
mediumReactivity Internals 8 mins61. How do you structure Pinia stores to avoid circular dependencies and god stores?
hardPinia 9 mins