vercel-react-best-practices

Identify and fix performance bottlenecks in React/Next.js applications.

27|11|Updated Mar 18, 2022
One-click install
npx skills add https://github.com/dkast/biztro --skill vercel-react-best-practices-dkast
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/dkast/biztro/tree/main/.github/skills/vercel-react-best-practices
Command: npx skills add https://github.com/dkast/biztro --skill vercel-react-best-practices-dkast

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React and Next.js projects often suffer from performance regressions due to waterfalls, large bundles, and mismatched server-client data handling. This skill provides a centralized, vetted set of best practices to help teams identify, diagnose, and fix these issues quickly.

Core Features & Use Cases

  • Eliminate waterfalls: guidance on parallelizing data fetching and deferring work to avoid blocking paths.
  • Bundle size optimization: strategies to avoid barrel imports, lazy-load heavy modules, and preload content based on user intent.
  • Server-side & client performance: patterns to secure server actions, minimize serialization, parallelize data fetching with composition, and optimize client data fetches.
  • Use Case: when refactoring a Next.js dashboard, apply these rules to reduce TTI and improve time-to-interactive.

Quick Start

Start by auditing a component or page with a known bottleneck, map to the closest rule (e.g., avoid barrel imports, use Promise.all for independent fetches), implement the recommended changes, and re-run the build and performance tests.

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 performance bottlenecks like data waterfalls and large bundle sizes?

Fix React and Next.js performance bottlenecks by applying centralized best practices: parallelize data fetching with Promise.all, eliminate barrel imports, and lazy-load heavy modules to reduce bundle size and improve time-to-interactive.

What is the best way to prevent waterfall data fetching in Next.js applications?

Prevent waterfall data fetching in Next.js by parallelizing independent data fetches using composition and deferring non-critical work. This approach avoids blocking render paths and minimizes unnecessary server-client data serialization.

How do I optimize bundle size in a React application using lazy loading?

Optimize React bundle size by avoiding barrel imports, lazy-loading heavy modules, and preloading content based on user intent. These strategies prevent large client-side JavaScript payloads and significantly reduce Time to Interactive (TTI).

How do I secure server actions and minimize serialization in Next.js?

Secure Next.js server actions by applying vetted patterns that validate inputs and minimize data serialization between server and client. This ensures safe server-side execution while maintaining optimal data flow and code quality.

Can I use suspense strategies to improve React server and client data flow performance?

Use suspense strategies to improve React data flow performance by deferring component rendering until data is ready. This prevents blocking the main thread and optimizes both server-side and client-side data fetching paths.

When should I apply Next.js best practices to reduce Time to Interactive during a dashboard refactoring?

Apply Next.js best practices to reduce Time to Interactive during dashboard refactoring when you notice performance regressions. Audit components for known bottlenecks, map them to rules like avoiding barrel imports, and re-run performance tests.