react-next-modern

Enforce React 19 and Next.js App Router server-first patterns during code reviews and migrations.

1|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/Tylerbryy/codewarden --skill react-next-modern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-next-modern
Source: https://github.com/Tylerbryy/codewarden/tree/main/skills/react-next-modern
Command: npx skills add https://github.com/Tylerbryy/codewarden --skill react-next-modern

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces the architectural shift from client-side synchronization to async-native patterns using React 19 and Next.js App Router. The goal is to eliminate unnecessary useEffect-driven data fetching, move data loading to the server, and leverage Server Components and Server Actions.

Core Features & Use Cases

  • Server Components and Server Actions for server-first data fetching
  • Form handling with useActionState, useFormStatus, and useOptimistic
  • Request memoization to avoid prop drilling via React.cache
  • Guidance for migrating from Pages Router to App Router and optimizing data flows

Quick Start

Activate during code reviews or migrations: "Apply Server Components and Server Actions patterns to this Next.js app's app/ directory."

Frequently Asked Questions about react-next-modern

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

FAQPage Schema
How do I migrate from Next.js Pages Router to App Router with server components?

App Router uses Server Components by default to move data fetching from client-side useEffect to the server. Migrate by converting page files to the app/ directory, replacing getServerSideProps with async server components, and using Server Actions for mutations. This eliminates prop drilling and improves performance.

What's the best way to handle data fetching in React 19 and Next.js?

Server-first data fetching uses async Server Components and Server Actions instead of client-side useEffect. React.cache handles request memoization to prevent duplicate fetches. This pattern reduces client-side code, improves SEO, and keeps sensitive logic on the server.

How do I replace useEffect-driven data fetching with server-side patterns?

Convert useEffect data fetching in client components to async Server Components that fetch data before rendering. Use Server Actions with useActionState and useFormStatus for forms. This approach is simpler, more performant, and eliminates race conditions and waterfalls.

Can I use Server Actions for form handling in Next.js App Router?

Yes. Server Actions handle form submissions directly on the server. Pair them with useActionState for optimistic updates and useFormStatus to track submission state. This replaces client-side form libraries and reduces JavaScript sent to browsers.

What patterns should I avoid when building with Next.js App Router?

Avoid getServerSideProps and getStaticProps—they're Pages Router only. Don't use useEffect for data fetching or prop drilling with React.cache. Skip fetching in client components when servers can handle it. These legacy patterns defeat App Router's benefits.