
Migration Vue 2→3 & Nuxt 2→3
Options API to Composition API, Vuex to Pinia, asyncData/fetch to useFetch, breaking changes, migration strategies, nuxtServerInit deprecation
1What is the main architectural difference between Vue 2's Options API and Vue 3's Composition API?
What is the main architectural difference between Vue 2's Options API and Vue 3's Composition API?
Risposta
The Composition API organizes code by logical concern rather than by option type, allowing related code to be grouped together. This approach improves readability and maintainability of complex components, unlike the Options API which separates data, methods, and computed properties. The Composition API also facilitates logic reuse through composables, effectively replacing mixins that could create naming conflicts.
2What major change did Nuxt 3 introduce regarding auto-imports compared to Nuxt 2?
What major change did Nuxt 3 introduce regarding auto-imports compared to Nuxt 2?
Risposta
Nuxt 3 enables auto-imports by default for composables, components, and framework utilities, eliminating the need for manual imports. This feature improves developer experience and reduces boilerplate code. Nuxt 2 required explicit imports for most functionalities. This feature can be disabled in the configuration if needed for explicit control reasons.
3In Vue 3, what method replaces Vue 2 filters that have been removed?
In Vue 3, what method replaces Vue 2 filters that have been removed?
Risposta
Filters were removed in Vue 3 because they created custom syntax that was difficult for new developers to understand and impacted performance. The official recommendation is to use computed properties or methods for data transformations. Computed properties offer the advantage of automatic caching for expensive calculations, while methods are suitable for simple transformations with parameters.
What is the default build tool in Nuxt 3, replacing Nuxt 2's Webpack?
How did the v-model syntax change between Vue 2 and Vue 3 for custom components?
+19 domande da colloquio
Altri argomenti di colloquio Vue.js / Nuxt.js
JavaScript Fundamentals
Modern JavaScript (ES6+)
Vue Basics
Vue Components
Vue Router
Pinia State Management
Vuex (Legacy)
Composition API
Vue Reactivity
Nuxt Fundamentals
Nuxt Data Fetching
Nuxt SSR & SSG
Nuxt Server Routes
Nuxt Modules
Vue Composables
Vue Forms & Validation
Nuxt State Management
Vue Testing
Nuxt Deployment & CI/CD
Vue Performance
Vue Advanced Patterns
TypeScript with Vue
Nuxt Authentication
SEO with Nuxt
Nuxt Internationalization
Vue Architecture
Nuxt Security
Vue Ecosystem
Padroneggia Vue.js / Nuxt.js per il tuo prossimo colloquio
Accedi a tutte le domande, flashcards, test tecnici, esercizi di code review e simulatori di colloquio.
Inizia gratis