Nuxt.js

Nuxt is the full-stack framework for Vue. It supplies file-based routing, server rendering, data fetching, server API routes, and a production build pipeline (Nitro) — so you get SEO-friendly Vue apps without stitching tools together.

If your app is purely client-side and SEO doesn't matter, plain Vue + Vite is simpler. Reach for Nuxt when you need server rendering, conventions for routing and data, or server routes alongside your UI.

TL;DR

Quick Example

useFetch runs on the server for the initial render, then hydrates on the client — no double fetch:

Core Concepts

Best Practices

Common Mistakes

Browser APIs during SSR

Double-fetching in setup

FAQ

Do I need Nuxt, or just Vue?

Use Nuxt when you need SSR/SSG (for SEO or fast first loads), routing and data-fetching conventions, or server routes. For a purely client-side app where SEO is irrelevant, plain Vue + Vite is lighter and simpler.

useFetch or useAsyncData?

useFetch is the convenient default — an SSR-aware wrapper for fetching a URL. useAsyncData gives you more control over the key, caching, and transforming the result (and pairs with any async function, not just a URL).

What is Nitro?

Nitro is Nuxt's server engine. It builds your server routes and SSR output into a portable bundle that can deploy to Node, serverless functions, or edge runtimes — so the same app runs across many hosts.

SSR or SSG with Nuxt?

Prerender (SSG) pages that are the same for all users and change rarely — fastest and cheapest to serve. Use SSR for dynamic or personalized pages. Nuxt lets you choose per route via route rules.

Related Topics

References