vercel-react-best-practices

Optimize React and Next.js apps for runtime performance and bundle size.

Updated Jul 4, 2026
One-click install
npx skills add https://github.com/mrsknetwork/mrsknetwork --skill vercel-react-best-practices-mrsknetwork
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/mrsknetwork/mrsknetwork/tree/main/.agents/skills/vercel-react-best-practices
Command: npx skills add https://github.com/mrsknetwork/mrsknetwork --skill vercel-react-best-practices-mrsknetwork

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps eliminate common React and Next.js performance regressions by providing prescriptive rules and examples to avoid server- and client-side waterfalls, reduce bundle size, and prevent unnecessary renders and I/O on both build and runtime paths.

Core Features & Use Cases

  • Eliminate Waterfalls: Patterns and examples to defer awaits, parallelize dependent work, and structure components to avoid sequential blocking.
  • Bundle Size Optimization: Recommendations for avoiding barrel imports, deferring non-critical libraries, dynamic imports, and intent-based preloading.
  • Server & Client Best Practices: Advice for server-side hoisting of static I/O, per-request deduplication, LRU caching across requests, safe Server Action authentication, and client-side deduplication and event handling.
  • Use Case: Automate auditing and refactoring of a Next.js page to remove sequential fetches, replace heavy initial imports with dynamic loading, and hoist repeated I/O to module initialization to improve TTI and reduce payload.

Quick Start

Run the vercel-react-best-practices skill to audit and refactor a Next.js page or component for waterfalls, bundle bloat, and server-side I/O inefficiencies.

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 server-side waterfalls in Next.js applications?

To eliminate server-side waterfalls in Next.js, defer awaits, parallelize dependent work, and hoist static I/O to module initialization. This prevents sequential blocking during server data fetching and reduces request latency.

What is the best way to reduce React bundle size caused by heavy imports?

The best way to reduce React bundle size is avoiding barrel imports, deferring non-critical libraries, and using dynamic imports. Intent-based preloading further ensures non-blocking operations while preserving component correctness.

How do I optimize Next.js server-side data fetching to prevent duplicate work?

Optimize Next.js server-side data fetching by hoisting repeated static I/O to module initialization and applying per-request deduplication. LRU caching across requests further prevents unnecessary renders and duplicate API calls.

Can I use automated refactoring to fix React performance issues without breaking correctness?

Yes, automated refactoring can fix React performance issues by applying pattern-based recommendations to introduce non-blocking operations while preserving correctness. It targets component rendering, API routes, and build-time imports safely.

Does this approach work for both server-rendering and client-side data fetching optimization?

Yes, this optimization approach works for both server-rendering and client-side data fetching. It provides patterns for Server Action authentication, client-side deduplication, and event handling to improve runtime performance across both paths.

When should I not use dynamic imports for bundle optimization in Next.js?

Dynamic imports for bundle optimization should be avoided when the imported library is critical for initial render or above-the-fold content. Over-deferring necessary dependencies introduces loading waterfalls and degrades Time to Interactive.