vercel-react-best-practices

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

Updated Aug 25, 2026
One-click install
npx skills add https://github.com/AliJ021/labelmod-core --skill vercel-react-best-practices-alij021
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/AliJ021/labelmod-core/tree/main/.claude/skills/vercel-react-best-practices
Command: npx skills add https://github.com/AliJ021/labelmod-core --skill vercel-react-best-practices-alij021

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 data-fetching waterfalls that are hard to spot during development. This Skill gives AI agents and developers a prioritized, rule-based checklist to catch and fix these performance issues during code generation and review. ## 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, each tagged by impact level from CRITICAL to LOW. - Incorrect vs. Correct Code Examples: Every rule includes concrete before/after TypeScript and TSX snippets with explanations, making it directly actionable for refactoring. - Use Case: When reviewing a Next.js page that fetches user, posts, and comments sequentially, the Skill directs you to parallelize with Promise.all(), add Suspense boundaries for streaming, and replace barrel imports with direct imports to cut bundle size. ## Quick Start Ask the AI to review your React component or Next.js page for performance issues using the Vercel React 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 awaiting sequentially. For partial dependencies, start promises early and chain dependent fetches, or use the better-all library to maximize parallelism automatically.

How to reduce React bundle size from barrel file imports?

Import directly from source files instead of barrel entry points that re-export thousands of modules. In Next.js 13.5+, use the optimizePackageImports config option to automatically transform barrel imports while keeping TypeScript support.

Does this guide work with React Server Components?

Yes, it includes dedicated server-side rules for RSC serialization minimization, React.cache() per-request deduplication, avoiding shared module state, and authenticating Server Actions like public API routes.

When should I use Suspense boundaries in React?

Use Suspense when only part of a page needs async data, so the layout renders immediately while data streams in. Avoid it for SEO-critical above-the-fold content or when layout shift from loading states hurts the user experience.

Why does my React component re-render too often?

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 optimization rules provide specific fixes for each pattern.