Skip to main content
InterviewHubPRO
Section Overview
Q35

Question 35 of 50

Part 3: Advanced Internals, Performance & Production (Senior / Staff)

70%
Nuxt & Universal SSR (50 Qs)•Part 3: Advanced Internals, Performance & Production (Senior / Staff)

What is the migration roadmap from Nuxt 2 to Nuxt 3?

senior LevelFormsPerformanceVue & Nuxt

In Simple Words: Migrating from Nuxt 2 to Nuxt 3 requires bridging the generational gap between Vue 2 and Vue 3:

  1. Bridge First (@nuxt/bridge): An interim tool enabling Nuxt 3 features (Composition API, Nitro, Vite) inside an existing Nuxt 2 codebase without breaking legacy modules.
  2. Convert Options API to Composition API: Replace asyncData({ $axios }) with useAsyncData() and useFetch().
  3. Adopt Native Script Setup: Refactor component methods, computed properties, and props to <script setup lang="ts">.
  4. Replace Vuex with Pinia: Replace Vuex stores with Pinia composables or Nuxt's native useState().
  5. Update Server Middleware: Migrate Express/Connect middleware to h3 event handlers.