vercel-react-best-practices

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

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/AnderHonorato/Mem-rias-IA---Infinity --skill vercel-react-best-practices-anderhonorato
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/AnderHonorato/Mem-rias-IA---Infinity/tree/main/Manus/Skills/snapshots/vercel-react-best-practices
Command: npx skills add https://github.com/AnderHonorato/Mem-rias-IA---Infinity --skill vercel-react-best-practices-anderhonorato

SYSTEM DOCUMENTATION & REQUIREMENTS

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 bottlenecks. This Skill provides a structured, impact-prioritized rule set from Vercel Engineering so AI agents and developers can consistently generate and refactor performant code. ## 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 performance, and advanced patterns. - Incorrect vs. Correct Code Examples: Each rule includes concrete TypeScript/TSX examples showing the wrong pattern, the right pattern, and the measured impact (e.g., 2-10x improvement from parallelizing fetches). - Use Case: When reviewing a Next.js page that sequentially awaits user, posts, and comments, apply the async-parallel rule to rewrite it with Promise.all(), cutting three round trips down to one. ## Quick Start Ask the AI to review your React component or Next.js page against the Vercel performance rules and refactor any violations it finds.

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 awaiting sequentially. For partial dependencies, use the better-all library or chain promises so each task starts at the earliest possible moment.

How to reduce React bundle size from icon libraries?

Avoid barrel file imports from libraries like lucide-react or @mui/material, which can load thousands of unused modules. In Next.js 13.5+, enable optimizePackageImports in next.config.js, or import directly from subpaths in other projects.

Does this guide cover Next.js Server Actions security?

Yes, the server-auth-actions rule requires authenticating and authorizing inside every Server Action, treating them like public API endpoints. It also recommends validating input with schemas like zod before performing mutations.

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

Use React.cache() for per-request deduplication so the same fetch runs once per render pass. Use a cross-request LRU cache for data shared across requests, since React.cache is cleared between requests.

Why does my React component re-render too often?

Common causes include defining components inside components, missing memoization of expensive work, and broad effect dependencies. The re-render rules recommend extracting memoized components, using functional setState, and narrowing effect dependencies to primitives.

When should I not use Suspense boundaries for data fetching?

Avoid Suspense when data drives 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 when content loads.