vercel-react-best-practices

Apply React and Next.js performance guidelines during code reviews and refactoring.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/aymenhamoudii/digitn-website --skill vercel-react-best-practices-aymenhamoudii
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/aymenhamoudii/digitn-website/tree/main/.qwen/skills/vercel-react-best-practices
Command: npx skills add https://github.com/aymenhamoudii/digitn-website --skill vercel-react-best-practices-aymenhamoudii

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a comprehensive, prioritized set of actionable rules to identify and fix performance regressions in React and Next.js codebases, reducing load time, bundle size, and server-side latency.

Core Features & Use Cases

  • Waterfall elimination: patterns and examples to parallelize data fetching and avoid sequential awaits in Server Components and API routes.
  • Bundle size & loading strategies: guidance on avoiding barrel imports, dynamic imports, conditional loading, and deferring non-critical third-party libraries.
  • Server-side best practices: recommendations for per-request deduplication, cross-request LRU caching, hoisting static I/O, minimizing RSC serialization, and safe Server Action authentication.
  • Use Case: Run during code reviews or automated refactors to produce a prioritized checklist of fixes (e.g., convert sequential fetches to Promise.all, replace barrel imports, hoist font reads to module scope).

Quick Start

Analyze the repository and produce a prioritized list of concrete React/Next.js performance fixes focused on eliminating waterfalls, reducing bundle size, and improving server-side caching and I/O hoisting.

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 React Server Components?

To eliminate data fetching waterfalls in React Server Components, replace sequential awaits with parallel data fetching patterns using Promise.all. This optimization reduces server-side latency by executing independent requests concurrently instead of sequentially.

What is the best way to reduce bundle size in a Next.js application?

The best way to reduce bundle size in Next.js involves avoiding barrel imports, using dynamic imports for conditional loading, and deferring non-critical third-party libraries. These strategies minimize the client-side JavaScript shipped to users.

How do I implement cross-request caching and per-request deduplication in Next.js?

Implement cross-request caching and per-request deduplication in Next.js by applying server-side best practices like LRU caching across requests and deduplicating fetches within a single request to optimize data fetching patterns.

Does this approach work for code reviews and automated refactoring of React performance?

Yes, this approach works for code reviews and automated refactoring of React performance by generating a prioritized checklist of fixes. It identifies regressions and suggests concrete refactors like hoisting static I/O to module scope.

When should I hoist static I/O to module scope in React Server Components?

You should hoist static I/O to module scope in React Server Components when reading static assets like fonts, as it moves the operation outside the request lifecycle. This minimizes RSC serialization and improves server-side rendering performance.

Why does minimizing RSC serialization improve Next.js performance?

Minimizing RSC serialization improves Next.js performance by reducing the payload size transferred between the server and client. Smaller serialized data decreases network transfer time and hydration overhead for React Server Components.