nextjs-react-expert

Identify and fix performance bottlenecks in Next.js and React apps.

Updated Aug 22, 2025
One-click install
npx skills add https://github.com/AnthonyCongHieu/voice_tool --skill nextjs-react-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-react-expert
Source: https://github.com/AnthonyCongHieu/voice_tool/tree/main/voice_tools_v1/.agent/skills/nextjs-react-expert
Command: npx skills add https://github.com/AnthonyCongHieu/voice_tool --skill nextjs-react-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Next.js and React performance bottlenecks are a common source of slow pages and poor UX; this knowledge base provides structured patterns to identify and fix waterfalls, reduce bundle size, and optimize server/client interactions.

Core Features & Use Cases

  • Parallel data fetching and Suspense strategies to avoid waterfalls.
  • Dynamic imports and barrel-import avoidance to shrink bundle size.
  • Server-side patterns for per-request caching, parallel fetching, and safe Server Actions.

Quick Start

Run a performance optimization pass on a Next.js/React project by applying sections 1 and 2 first, then section 3, and finally section 4.

Frequently Asked Questions about nextjs-react-expert

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

FAQPage Schema
How do I fix data fetching waterfalls in Next.js React applications?

Fix data fetching waterfalls in Next.js by applying parallel data fetching and Suspense strategies. This approach restructures server/client interactions to fetch resources concurrently, avoiding sequential request delays and reducing page load times.

What is the best way to reduce bundle size in a Next.js React app?

Reduce bundle size in a Next.js React app by implementing dynamic imports and avoiding barrel imports. These patterns ensure only necessary code loads per route, shrinking the client payload and improving overall application performance.

How does memoization optimize React server components?

Memoization optimizes React server components by preventing unnecessary re-renders and redundant calculations. Applying mindful memoization alongside server-side per-request caching ensures stable data retrieval and minimizes client-side rendering overhead.

Can I use Server Actions safely for performance optimization in Next.js?

Use Server Actions safely for performance optimization in Next.js by following structured server-side patterns. These patterns secure per-request caching and parallel fetching workflows, ensuring data mutations do not trigger client waterfalls.

Why does sequential fetching slow down SSR workflows in React?

Sequential fetching slows down SSR workflows in React because each request waits for the previous one to complete, creating a waterfall. Transitioning to parallel data fetching eliminates these bottlenecks and accelerates server-side rendering.

When should I use dynamic imports instead of static imports for React components?

Use dynamic imports instead of static imports for React components when you need to shrink bundle size and defer loading non-critical code. This avoids loading entire libraries upfront, optimizing both SSR and CSR workflows.