vercel-react-best-practices

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

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

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, unnecessary re-renders, bloated bundles, and async waterfalls that degrade user experience. This Skill provides a structured, prioritized rule set from Vercel Engineering so AI agents and developers consistently apply proven performance patterns instead of guessing. ## 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, with impact metrics like 2-10x improvements or 200-800ms savings. - Use Case: When refactoring a Next.js page that fetches user, posts, and comments sequentially, the Skill directs you to use Promise.all() for parallel fetching, add Suspense boundaries for faster initial paint, and avoid barrel file imports to cut bundle size. ## Quick Start Review my React component and apply the Vercel performance best practices to eliminate waterfalls and reduce unnecessary re-renders.

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 React and Next.js?

Use Promise.all() for independent async operations so they run concurrently instead of sequentially. For partial dependencies, start promises early and await late, or use the better-all library to maximize parallelism automatically.

How to reduce bundle size in a Next.js application?

Avoid barrel file imports from libraries like lucide-react or @mui/material by using direct imports or Next.js optimizePackageImports. Use next/dynamic to lazy-load heavy components and defer non-critical third-party scripts until after hydration.

What is the best way to prevent unnecessary React re-renders?

Calculate derived state during rendering instead of in effects, use functional setState updates, and extract expensive work into memoized components. Use useDeferredValue or startTransition for non-urgent updates to keep inputs responsive.

Does this guide apply to React apps not using Next.js?

Yes, most rules apply to any React codebase, including re-render optimization, JavaScript performance, and client-side fetching patterns. Next.js-specific rules cover Server Actions, RSC serialization, and next/dynamic imports.

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, or when queries are small and fast. The trade-off is faster initial paint versus potential layout shift.

Why should Server Actions be authenticated like API routes?

Server Actions are exposed as public endpoints and can be invoked directly, bypassing middleware or layout guards. Always verify authentication and authorization inside each action and validate inputs before performing mutations.