react-best-practices

Reviews React and Next.js code against 64 performance optimization rules.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/sharad07072007/paras --skill react-best-practices-sharad07072007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-best-practices
Source: https://github.com/sharad07072007/paras/tree/main/.agents/plugins/vercel/skills/react-best-practices
Command: npx skills add https://github.com/sharad07072007/paras --skill react-best-practices-sharad07072007

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React and Next.js codebases often suffer from performance issues like async waterfalls, bloated bundles, unnecessary re-renders, and inefficient data fetching that are hard to catch during manual review. This Skill provides a structured, prioritized checklist of 64 rules across 8 categories so AI agents and developers can systematically identify and fix these issues. ## Core Features & Use Cases - Prioritized Rule Catalog: 64 rules organized by impact, from CRITICAL (eliminating waterfalls, bundle size) to LOW (advanced patterns), each with incorrect vs. correct code examples. - Automated Validation: Detects legacy CSS-in-JS libraries (styled-components, Emotion, MUI, Chakra) in TSX files and recommends migrating to shadcn/ui with Tailwind CSS. - Use Case: After editing several TSX components, trigger this Skill to review hooks usage, server-side data fetching, RSC serialization boundaries, and re-render patterns, then apply fixes like parallelizing Promise.all calls or hoisting static JSX. ## Quick Start Review my React components in the components directory for performance issues and suggest fixes based on the Vercel best practices rules.

Frequently Asked Questions about react-best-practices

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

FAQPage Schema
How do I eliminate async waterfalls in React and Next.js?

Use Promise.all() for independent async operations, start promises early and await late in API routes, and use better-all for partial dependency chains. These patterns can yield 2-10x improvements by removing sequential network round trips.

How to reduce React bundle size from barrel file imports?

Import directly from source files instead of barrel entry points, or enable optimizePackageImports in Next.js 13.5+ config. Libraries like lucide-react and @mui/material can load thousands of unused modules, adding 200-800ms to cold starts.

Does this Skill work with Next.js Server Components?

Yes, it includes dedicated rules for React Server Components covering serialization minimization at RSC boundaries, React.cache() per-request deduplication, parallel data fetching via component composition, and Server Action authentication.

When should I use React.cache() versus an LRU cache?

React.cache() deduplicates fetches within a single request only. For data shared across sequential requests, use an LRU cache with TTL, which is especially effective with Vercel Fluid Compute where function instances persist.

Why does the Skill warn about styled-components and MUI?

The validation rules detect legacy CSS-in-JS libraries like styled-components, Emotion, MUI, and Chakra because they hurt SSR performance. It recommends migrating to shadcn/ui with Tailwind CSS for better Vercel ecosystem alignment.