Released · improving
Framework · Since 2014
Vue.js is a progressive JavaScript framework for building UIs from declarative components; Nuxt adds routing, server rendering and server APIs on top.
Vue.js is an open-source JavaScript framework for building user interfaces, created by Evan You and first released in 2014. It combines HTML-based templates with reactive state, so the page updates automatically when data changes, and its basic unit is the single-file component (.vue) that keeps template, script and style together. Nuxt is a full-stack framework built on Vue that adds file-based routing, auto-imports, server-side rendering and server APIs powered by the Nitro engine.
Vue can be adopted incrementally, from a single script tag that enhances part of an existing page to a full single-page application built with Vite. It fits interactive screens such as admin panels, dashboards and internal tools particularly well. When search visibility and first-load speed matter, or when you want pages and APIs in one project, Nuxt provides server rendering, static generation and server routes, and deploys to Node.js servers, static hosting and many other targets.
If you are new to Vue, install Node.js and work through the interactive tutorial and the guide on the official site to learn reactivity, components and template syntax. Then scaffold a Vite-based project with npm create vue@latest and build real screens, moving to Nuxt once you need routing conventions and server rendering. Pinia for state management and Vitest for unit tests are the officially recommended companions.
State declared with ref, reactive and computed tracks its dependents, so only the parts of the page that use a value are re-rendered when it changes.
Template, script and style live in one .vue file, with scoped styles and TypeScript support out of the box.
Related logic is grouped into functions and reused as composables, which keeps large components organized by feature.
File-based routing, auto-imports, server rendering, static generation and API routes in the server folder work without extra configuration.
Vue and Nuxt tooling runs on Node.js. Install the LTS release from nodejs.org and confirm that node and npm report their versions.
node --version && npm --versionThe official scaffolding tool, create-vue, asks whether to add TypeScript, Vue Router, Pinia, Vitest and more. In the new folder, run npm install and npm run dev to start the Vite dev server.
npm create vue@latestTo use Nuxt, scaffold a project with nuxi. Change into the new folder and run npm run dev; the dev server listens on http://localhost:3000 by default.
npx nuxi@latest init my-nuxt-appsrc/App.vue is the root component of a create-vue project. The script setup block creates a reactive count with ref(0); the template shows it with double curly braces and increments it on every click through @click. When count changes, Vue re-renders only what depends on it. With npm run dev running, saving the file updates the browser instantly.
src/App.vue
<script setup lang="ts">
import { ref } from "vue";
const count = ref(0);
</script>
<template>
<h1>Hello, Vue!</h1>
<button @click="count++">Clicked {{ count }} times</button>
</template>
npm create vue@latest hello-vue && cd hello-vue && npm install && npm run devSix chapters that take you from installation to the core ideas of Vue.js · Nuxt.
Ask questions, share experience and trade opinions about Vue.js · Nuxt.
No discussions yet. Start the first one.
0 comments
Sign in · Sign in to leave a comment.
Be the first to comment.