Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Simple counter using Vue 3 ref and template binding.
<template>
<div :class="isDark ? 'dark-theme' : 'light-theme'">
<h2>Counter: {{ count }}</h2>
<button @click="count++">+</button>
<button @click="count--">-</button>
<button @click="count=0">Reset</button>
<button @click="isDark = !isDark">Switch Theme</button>
</div>
</template>
<script setup>
import { ref } from 'vue';
const count = ref(0);
const isDark = ref(false);
</script>
<style>
.dark-theme { background-color: #222; color: #eee; }
.light-theme { background-color: #fff; color: #000; }
</style>Nuxt.js is a high-level framework built on top of Vue.js for creating modern web applications with SSR, SSG, API integration, routing, performance optimizations, and full-stack capabilities using server routes. It emphasizes flexibility, DX, and hybrid rendering.
Origin & Creator
Created by the Chopin brothers (Alexandre & Sébastien Chopin) and released in 2016, maintained by the NuxtLabs team.
Industrial Note
Nuxt excels in SEO-heavy websites, fast content sites, dashboards, PWAs, internationalized apps, and full-stack Vue-based platforms.