vercel-react-best-practices

Analyze React and Next.js code for waterfall and bundle optimizations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a comprehensive, opinionated set of rules and examples to eliminate performance regressions in React and Next.js projects by addressing waterfalls, excessive bundle size, server-side inefficiencies, and unnecessary re-renders so teams and agents can produce faster, more reliable applications.

Core Features & Use Cases

  • Waterfall elimination: Patterns and examples to parallelize dependent and independent async operations (Promise.all, better-all, early await deferral).
  • Bundle optimization: Guidance for avoiding barrel imports, dynamic imports, conditional loading, and intent-based preloading to shrink initial payloads.
  • Server & client data strategies: Best practices for RSC serialization minimization, per-request and cross-request caching, non-blocking side effects (after()), and SWR-based deduplication.
  • Rendering and micro-optimizations: Rules for Suspense boundaries, hoisting static JSX, CSS content-visibility, memoization, and JS hot-path improvements for real-world refactors and code reviews.

Quick Start

Use the vercel-react-best-practices skill to analyze a React or Next.js page and return a prioritized list of concrete code changes to remove waterfalls, reduce bundle size, and improve server/client data fetching.

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 fix React and Next.js server-side waterfalls?

Reduce RSC serialization bloat in Next.js by minimizing large data transfers across the server-client boundary using per-request caching, cross-request caching, and non-blocking side effects like after().

What is the best way to optimize React bundle size with dynamic imports?

Use Suspense boundaries in React to handle rendering micro-optimizations by hoisting static JSX, applying CSS content-visibility, and leveraging memoization to prevent unnecessary re-renders.

How do I reduce RSC serialization bloat in Next.js?

Reduce RSC serialization bloat in Next.js by minimizing large data transfers across the server-client boundary using per-request caching, cross-request caching, and non-blocking side effects like after().

Does this approach work with React Server Components data fetching?

Yes, this approach works with React Server Components data fetching by applying SWR-based deduplication, non-blocking side effects, and minimal RSC serialization compatible with Next.js rendering patterns.

Why does my Next.js page have slow initial rendering?

Your Next.js page may have slow initial rendering due to heavy imports, sequential waterfalls, or excessive re-renders, which can be resolved through dynamic imports, Promise parallelization, and Suspense boundaries.

When should I not use Promise.all for parallel data fetching?

You should not use Promise.all for parallel data fetching when operations are interdependent; instead, defer early awaits and apply waterfall elimination patterns only to independent async operations.