vercel-react-best-practices

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

Updated Sep 6, 2026
One-click install
npx skills add https://github.com/inventashif/helpful-code-sidekick --skill vercel-react-best-practices-inventashif
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/inventashif/helpful-code-sidekick/tree/main/scripts/hackerai/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/inventashif/helpful-code-sidekick --skill vercel-react-best-practices-inventashif

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 provides a structured, prioritized rule set from Vercel Engineering so AI-assisted code generation and review consistently follows proven performance patterns. ## Core Features & Use Cases - 57 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, each tagged by impact level. - Incorrect vs. Correct Code Examples: Every rule includes concrete before/after TypeScript and TSX snippets, making it directly actionable for refactoring and code review. - Use Case: When reviewing a Next.js page that fetches user, posts, and comments sequentially, apply the async-parallel rule to rewrite the fetches with Promise.all(), cutting three network round trips down to one. ## Quick Start Review my Next.js page component and apply the Vercel React best practices rules to eliminate data-fetching waterfalls and reduce bundle size.

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(), or use better-all for partial dependency chains. In components, use Suspense boundaries so the layout renders while data streams in.

How to reduce bundle size in a React Next.js app?

Import directly from source files instead of barrel files like lucide-react or @mui/material entry points, and use next/dynamic to lazy-load heavy components. Next.js 13.5+ can automate this with the optimizePackageImports config option.

Does React.cache() work with Next.js fetch requests?

Next.js automatically memoizes fetch calls with the same URL and options within a request, so React.cache() is unnecessary there. Use React.cache() for database queries, authentication checks, and other non-fetch async work.

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.

Why does my React component re-render too often?

Common causes include subscribing to state only used in callbacks, missing memoization of expensive computations, and broad effect dependencies. Apply rules like functional setState, derived state during render, and useRef for transient values.