vercel-react-best-practices

Applies Vercel performance optimization rules when writing, reviewing, or refactoring React and Next.js code.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/MSC72m/DevForge --skill vercel-react-best-practices-msc72m
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/MSC72m/DevForge/tree/main/skills/vercel-react-best-practices
Command: npx skills add https://github.com/MSC72m/DevForge --skill vercel-react-best-practices-msc72m

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 data-fetching waterfalls, bloated bundles, unnecessary re-renders, and server-side serialization overhead. This Skill provides a structured, impact-prioritized rule set from Vercel Engineering so AI agents and developers can systematically identify and fix these problems. ## Core Features & Use Cases - 70 Prioritized Rules Across 8 Categories: Covers eliminating waterfalls, bundle size optimization, server-side performance, client-side data fetching, re-render optimization, rendering performance, JavaScript micro-optimizations, and advanced patterns. - Incorrect vs. Correct Code Examples: Each rule includes concrete TypeScript/TSX examples showing the anti-pattern and the optimized implementation, plus impact metrics (e.g., 2-10x improvement from parallelization). - Use Case: When refactoring a Next.js page that sequentially awaits multiple fetches, apply the async rules to parallelize independent operations with Promise.all() and add Suspense boundaries for faster initial paint. ## Quick Start Ask the agent to review your React component or Next.js page for performance issues using the Vercel best practices rules.

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 data fetching waterfalls in Next.js?▼

Start independent async operations immediately and await them together with Promise.all() instead of sequential awaits. For partial dependencies, use better-all or chain promises, and use Suspense boundaries so layout renders while data streams in.

How to reduce React 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; otherwise import directly from subpaths like @mui/material/Button.

When should I use next/dynamic for component imports?▼

Use next/dynamic with ssr: false for heavy components not needed on initial render, such as Monaco Editor or analytics libraries. This directly improves Time to Interactive and Largest Contentful Paint by deferring large chunks.

Does this guide cover React Server Components performance?▼

Yes, it includes server-side rules for RSC: minimizing serialization at client boundaries, per-request deduplication with React.cache(), avoiding shared module state for request data, and authenticating Server Actions like public API routes.

Why do React components re-render unnecessarily?▼

Common causes include defining components inside components, missing memoization of expensive work, broad effect dependencies, and subscribing to raw state instead of derived values. The re-render rules cover functional setState, useDeferredValue, and transitions.

When should I not use Suspense boundaries for data fetching?▼

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