nuxt4-patterns

Resolve Nuxt 4 hydration mismatches and optimize data fetching patterns.

Updated Jun 25, 2026
One-click install
npx skills add https://github.com/sumeetonline90/fitup_all --skill nuxt4-patterns-sumeetonline90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nuxt4-patterns
Source: https://github.com/sumeetonline90/fitup_all/tree/main/.cursor/skills/nuxt4-patterns
Command: npx skills add https://github.com/sumeetonline90/fitup_all --skill nuxt4-patterns-sumeetonline90

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Nuxt 4 applications frequently suffer from hydration mismatches between server-rendered HTML and client state, inefficient data fetching that causes duplicate requests and bloated payloads, and misconfigured rendering strategies that hurt SEO or performance.

Core Features & Use Cases

  • Hydration Safety Guidance: Provides clear rules to avoid server-client markup mismatches, including proper use of client-only logic, onMounted(), and ClientOnly components for browser-only features.
  • Optimized Data Fetching Patterns: Covers best practices for useFetch and useAsyncData to enable SSR-safe data loading, lazy loading for non-critical content, and payload size optimization.
  • Rendering Strategy Configuration: Helps developers set appropriate route rules for prerender, ISR, SWR, and client-only routes to balance SEO, freshness, and performance for different page types.
  • Use Case: A developer building a Nuxt 4 content site can use this skill to ensure blog posts render correctly for SEO via prerender, lazy load non-critical comment sections, and avoid hydration errors from client-only date displays.

Quick Start

Use the nuxt4-patterns skill to fix hydration mismatches and optimize data fetching for your Nuxt 4 application.

Frequently Asked Questions about nuxt4-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix hydration mismatches in Nuxt 4?

Fix hydration mismatches in Nuxt 4 by isolating browser-only logic using onMounted(), ClientOnly components, and client-only rendering strategies to prevent server-client markup conflicts.

What's the best way to optimize useFetch data fetching for Nuxt 4 SSR?

Optimize Nuxt 4 SSR data fetching by using useFetch and useAsyncData with lazy loading for non-critical content, which reduces duplicate requests and minimizes payload sizes.

How do I configure route rules for hybrid rendering in Nuxt 4?

Configure Nuxt 4 route rules by assigning prerender, ISR, SWR, or client-only rendering strategies to specific routes, balancing SEO requirements, data freshness, and page performance.

Does Nuxt 4 support lazy loading for non-critical resources?

Yes, Nuxt 4 supports lazy loading for non-critical resources by leveraging useFetch options and ClientOnly components to defer loading until needed, optimizing initial payload sizes.

Why does my Nuxt 4 application have duplicate data requests during server-side rendering?

Duplicate data requests during Nuxt 4 SSR occur from inefficient data fetching patterns, which you can resolve by properly configuring useAsyncData and useFetch to manage payload state.

When do I need client-only rendering routes in Nuxt 4?

You need client-only rendering routes in Nuxt 4 for pages requiring browser APIs without SEO constraints, preventing hydration mismatches by skipping server-side HTML generation entirely.