vercel-react-best-practices

Applies Vercel's React and Next.js performance optimization rules when writing or refactoring code.

Updated Aug 3, 2026
One-click install
npx skills add https://github.com/arfaomar/NotebookLM-Clone --skill vercel-react-best-practices-arfaomar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/arfaomar/NotebookLM-Clone/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/arfaomar/NotebookLM-Clone --skill vercel-react-best-practices-arfaomar

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 request waterfalls, bloated bundles, and unnecessary re-renders that are hard to spot during development and code review. ## Core Features & Use Cases - 70 Prioritized Performance Rules: Covers 8 categories from eliminating async waterfalls (CRITICAL) to advanced hook patterns (LOW), each with incorrect vs. correct code examples. - Actionable Refactoring Guidance: Each rule includes impact metrics, explanations, and references to guide automated or manual code improvements. - Use Case: When reviewing a Next.js page that fetches user, posts, and comments sequentially, apply the async-parallel rule to rewrite it with Promise.all() and cut three round trips down to one. ## Quick Start Review my Next.js page component for performance issues and apply the relevant React best practices rules to fix any waterfalls or bundle problems.

Frequently Asked Questions about vercel-react-best-practices

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

FAQPage Schema
How do I eliminate async waterfalls in Next.js API routes?

Start independent operations immediately without awaiting them, then await the promises later. Use Promise.all() for independent fetches and better-all for operations with partial dependencies, which can yield 2-10x improvement.

How to reduce bundle size from barrel file imports?

Avoid importing from barrel files like lucide-react or @mui/material entry points, which can load thousands of modules. In Next.js 13.5+, use optimizePackageImports in next.config.js, or import directly from subpaths in other projects.

Does this guide cover React Server Components performance?

Yes, it includes server-side rules such as authenticating Server Actions, using React.cache() for per-request deduplication, minimizing RSC prop serialization, and avoiding shared module state for request data.

When should I not use Suspense boundaries for data fetching?

Avoid Suspense when data is critical for layout decisions, needed for SEO above the fold, or when queries are small and fast. The trade-off is faster initial paint versus potential layout shift.

What is the difference between useEffectEvent and storing handlers in refs?

Both create stable callback references that always call the latest handler without re-subscribing effects. useEffectEvent is the modern React API providing a cleaner syntax, while the ref pattern works on older React versions.