vercel-react-best-practices

Optimize React and Next.js runtime and build performance by eliminating async waterfalls and reducing bundle weight.

46.2k|5.7k|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/calesthio/OpenMontage --skill vercel-react-best-practices-calesthio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/calesthio/OpenMontage/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/calesthio/OpenMontage --skill vercel-react-best-practices-calesthio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide removes common performance regressions in React and Next.js projects by providing concrete, prioritized rules and examples that enable faster initial render times, lower bundle sizes, and more efficient server-side behavior.

Core Features & Use Cases

  • Eliminate Waterfalls: Patterns and examples to parallelize async work and avoid sequential awaits in Server Components and API routes.
  • Bundle Size & Loading: Guidance on avoiding barrel imports, using dynamic imports, deferring non-critical third-party libraries, and preloading based on user intent.
  • Server & RSC Best Practices: Advice on hoisting static I/O, minimizing serialization across RSC boundaries, LRU caching, and authenticating Server Actions.
  • Use Case: Use this skill when writing, reviewing, or automatically refactoring React/Next.js code to improve TTI, LCP, and server response latency.

Quick Start

Refactor this Next.js page to eliminate waterfall fetches, use dynamic imports for large components, and hoist static I/O to module level.

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 waterfall fetches in Next.js Server Components?

To eliminate waterfall fetches in Next.js Server Components, parallelize async work using Promise.all instead of sequential awaits. This prevents blocking the server response latency and significantly improves your Largest Contentful Paint by resolving independent data requests simultaneously.

What is the best way to reduce bundle size in a React application?

The best way to reduce React bundle size is to avoid barrel imports, utilize dynamic imports for large components, and defer non-critical third-party libraries. This minimizes the client bundle weight and directly improves Time to Interactive metrics.

How does hoisting static I/O to module level improve Next.js performance?

Hoisting static I/O to module level improves Next.js performance by executing read operations once during module initialization rather than per request. This reduces server response latency by preventing redundant asynchronous operations during component rendering.

Can I use LRU caching to optimize Server Actions in React Server Components?

Yes, you can use LRU caching to optimize Server Actions in React Server Components. Implementing LRU caching minimizes expensive recomputations and reduces server response latency, while authenticating Server Actions ensures secure and efficient data mutations.

Why should I minimize serialization across RSC boundaries?

Minimizing serialization across RSC boundaries prevents passing large objects from Server Components to Client Components. This reduces the React payload size and avoids unnecessary processing overhead, directly lowering server response latency and improving initial render times.

Do I need dynamic imports for all third-party libraries in Next.js?

You do not need dynamic imports for all third-party libraries in Next.js. Reserve dynamic imports for large, non-critical libraries and defer loading them based on user intent. This reduces initial bundle weight while maintaining optimal Time to Interactive.