vercel-react-best-practices

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

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/devsajad/next.js-starter-kit --skill vercel-react-best-practices-devsajad
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/devsajad/next.js-starter-kit/tree/main/.claude/skills/vercel-react-best-practices
Command: npx skills add https://github.com/devsajad/next.js-starter-kit --skill vercel-react-best-practices-devsajad

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React and Next.js codebases often suffer from slow load times, data-fetching waterfalls, bloated bundles, and unnecessary re-renders. This Skill provides a structured, impact-prioritized rule set from Vercel Engineering so AI agents and developers consistently apply proven performance patterns when writing, reviewing, or refactoring code. ## Core Features & Use Cases - 70 Prioritized Rules Across 8 Categories: Covers eliminating async waterfalls, bundle size optimization, server-side performance, client-side data fetching, re-render optimization, rendering performance, JavaScript micro-optimizations, and advanced React patterns. - Incorrect vs. Correct Code Examples: Each rule includes concrete TypeScript/TSX examples showing the anti-pattern and the optimized implementation, with impact metrics like 2-10x improvements or 200-800ms import cost reductions. - Use Case: When refactoring a Next.js page that sequentially awaits multiple fetches, apply the async rules to parallelize with Promise.all() and add strategic Suspense boundaries so the layout renders immediately while data streams in. ## Quick Start Review my Next.js page component using the vercel-react-best-practices skill and fix any data-fetching waterfalls or bundle size issues.

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 bundle size in a Next.js application?

Avoid barrel file imports from libraries like lucide-react or @mui/material, use next/dynamic for heavy components like Monaco, and defer analytics or logging libraries until after hydration. Next.js 13.5+ can optimize package imports automatically via optimizePackageImports.

Does this guide cover React Server Components performance?

Yes, it includes server-side rules for RSC serialization minimization, per-request deduplication with React.cache(), cross-request LRU caching, and avoiding shared module state that can leak data between concurrent requests.

When should I not use Suspense boundaries for data fetching?

Avoid Suspense when data is critical for layout decisions, when content is SEO-critical above the fold, when queries are small and fast, or when you want to prevent layout shift between loading and loaded states.

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

Both keep subscriptions stable while accessing the latest callback. useEffectEvent is the modern React API providing a stable function reference, while the ref pattern manually syncs the handler into a ref for older React versions.