react-nextjs-patterns

Codifies React 19 and Next.js 16 App Router best practices for server components and client boundaries.

2|Updated Apr 9, 2023
One-click install
npx skills add https://github.com/Esdeveniments/esdeveniments-frontend --skill react-nextjs-patterns-esdeveniments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-nextjs-patterns
Source: https://github.com/Esdeveniments/esdeveniments-frontend/tree/main/.github/skills/react-nextjs-patterns
Command: npx skills add https://github.com/Esdeveniments/esdeveniments-frontend --skill react-nextjs-patterns-esdeveniments

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill codifies best practices for building React 19 and Next.js 16 apps with the App Router, emphasizing server components by default and minimal client boundaries to improve performance and maintainability.

Core Features & Use Cases

  • Server Components by default to render data-heavy or SEO-critical UI without extra client-side JavaScript.
  • Minimal client boundaries, with "use client" added only to leaf components that require interactivity.
  • Guidance for data fetching, routing, and modern React patterns across typical pages and components.
  • Use Case: Apply server-first patterns to dashboards, lists, and content pages while isolating interactive widgets as client islands.

Quick Start

Set up your app to render server components by default, add "use client" only where needed, and adopt App Router conventions across pages and components.

Frequently Asked Questions about react-nextjs-patterns

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

FAQPage Schema
How do I structure Next.js App Router projects with server components by default?

Next.js App Router projects should use server components by default to render data-heavy or SEO-critical UI without extra client-side JavaScript, isolating interactive widgets as client islands using minimal boundaries.

When should I add 'use client' in React 19 and Next.js 16 applications?

You should add 'use client' only to leaf components that require interactivity, establishing minimal client boundaries. This prevents unnecessary JavaScript on data-heavy pages while preserving server-side rendering performance.

What is the best way to isolate interactive widgets in a server-first React application?

The best way to isolate interactive widgets is applying server-first patterns across pages and routing, adding 'use client' strictly to interactive leaf components to maintain performance and maintainability.

Does this React patterns approach work for both dashboards and content pages?

Yes, this approach applies server-first patterns to dashboards, lists, and content pages. It enforces structured design system conventions and documented guidelines to ensure performance across all typical page types.

How do I manage data fetching and routing conventions in modern Next.js apps?

Data fetching and routing conventions are managed through App Router patterns across components, hooks, and pages, emphasizing server components by default to improve performance and maintainability.

Why does using server components by default improve Next.js application performance?

Using server components by default improves performance by rendering data-heavy or SEO-critical UI without extra client-side JavaScript, reducing bundle size while enforcing structured design conventions for maintainability.