Nuxt & Universal SSR (50 Qs)•Part 1: Nuxt 3 Fundamentals (Junior / Entry-Level)
What is the difference between `app.vue` and `layouts/default.vue`?
junior LevelCode ExampleVue & Nuxt
In Simple Words:
app.vueis the universal root entry point of your Nuxt application. It persists across all route changes and never re-renders. It is ideal for global providers, notification banners, or loading indicators.layouts/are reusable structural templates (header, sidebar, footer) that can be swapped dynamically or assigned to specific pages usingdefinePageMeta({ layout: 'admin' }).
vue
<!-- app.vue -->
<template>
<NuxtLoadingIndicator color="#10b981" :height="3" />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>
vue
<!-- layouts/default.vue -->
<template>
<div class="layout-wrapper">
<header><nav>Navigation</nav></header>
<main>
<slot /> <!-- Page content rendered here -->
</main>
<footer>© 2026 Enterprise Inc.</footer>
</div>
</template>