react-best-practices

Fix React and Next.js performance bottlenecks in async flows, imports, and rendering.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/nishchaydev/emitra --skill react-best-practices-nishchaydev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-best-practices
Source: https://github.com/nishchaydev/emitra/tree/main/.agent/skills/nextjs-react-expert
Command: npx skills add https://github.com/nishchaydev/emitra --skill react-best-practices-nishchaydev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

React and Next.js projects often ship with performance bottlenecks such as request waterfalls, bloated bundles, inefficient server rendering, redundant client fetching, and unnecessary re-renders that slow time to interactive and degrade user experience.

Core Features & Use Cases

  • Eliminates async waterfalls: Refactors sequential awaits into parallel workflows in APIs, Server Actions, and data loading to reduce end-to-end latency.
  • Shrinks bundle size: Prevents common import and code-splitting pitfalls (e.g., barrel imports, heavy static components) to improve load time.
  • Optimizes server and client rendering: Uses server caching, RSC boundary discipline, Suspense streaming, and client deduplication patterns (SWR) to reduce wasted work.
  • Reduces re-renders and rendering cost: Applies React-level techniques to avoid unnecessary state updates, stabilize callbacks, and improve list rendering performance.
  • Micro-optimizes hot paths: Uses pragmatic JavaScript and algorithmic improvements (caching, loop patterns, immutability-friendly methods).

Quick Start

Use the react-best-practices skill to audit your app by asking: "Review my Next.js/React code for performance issues and propose the highest-impact fixes first, prioritizing waterfalls and bundle size."

Frequently Asked Questions about react-best-practices

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

FAQPage Schema
How do I fix request waterfalls in Next.js server components?

To fix Next.js request waterfalls, sequential await calls in server components and route handlers must be refactored into parallel workflows. This reduces end-to-end latency by fetching data concurrently instead of waiting for each request to finish.

What is the best way to reduce bundle size caused by React imports?

Reducing React bundle size requires avoiding barrel imports and heavy static components. Code-splitting pitfalls should be identified and fixed to prevent bloated bundles, which directly improves initial page load time.

How do I optimize React re-renders and state updates in a dashboard?

Optimizing React re-renders involves stabilizing callbacks and preventing unnecessary state updates. This reduces rendering cost and improves UI responsiveness, particularly in data-driven dashboard components.

Does SWR deduplication work with Next.js client fetching?

SWR deduplication works with Next.js client fetching to reduce redundant network requests. By applying SWR patterns, wasted work is eliminated and client-side data fetching becomes significantly more efficient.

How do I optimize SSR and RSC boundaries in Next.js?

Optimizing SSR and RSC boundaries requires applying server caching, RSC boundary discipline, and Suspense streaming. This reduces wasted work during server rendering and improves overall page responsiveness.

Can I audit my Next.js app for performance bottlenecks automatically?

You can audit Next.js apps for performance bottlenecks by reviewing code for inefficient async flows, imports, and rendering patterns. The highest-impact fixes are prioritized, targeting waterfalls and bundle size first.