vercel-react-best-practices

Enforce React and Next.js performance rules for async, bundle, and render optimization.

Updated Mar 22, 2018
One-click install
npx skills add https://github.com/tnunamak/dotfiles --skill vercel-react-best-practices-tnunamak
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vercel-react-best-practices
Source: https://github.com/tnunamak/dotfiles/tree/main/ai/skills/local/vercel-react-best-practices
Command: npx skills add https://github.com/tnunamak/dotfiles --skill vercel-react-best-practices-tnunamak

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It eliminates slow UI rendering patterns and performance pitfalls in React and Next.js by enforcing practical, high-impact rules for async flows, bundle size, server rendering, and client updates.

Core Features & Use Cases

  • Asynchronous performance fixes: Detects and refactors sequential awaits and server-side waterfalls using patterns like deferred awaits, parallelization, and Suspense boundaries.
  • Bundle and load-time optimization: Enforces import strategies, dynamic imports, conditional/lazy loading, and deferring non-critical third-party code until after hydration.
  • Server-to-client efficiency: Reduces unnecessary RSC serialization, duplicate props payloads, and redundant server work with techniques like React.cache() and careful boundary data shaping.
  • Client render and re-render improvements: Guides state subscription choices, derived-state handling, stable callbacks, event-driven side effects, and transition-based updates for responsiveness.

Quick Start

Apply these rules to your React/Next.js code by asking an AI to refactor a specific page or component for performance, ensuring it follows the Skill’s async, bundle, RSC serialization, and render optimization guidance.

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 server-side waterfall issues caused by sequential awaits?▼

Reduce React bundle size by enforcing dynamic imports, lazy loading route components, and deferring third-party script loading until after hydration to minimize initial download and parse times.

What is the best way to optimize React Server Component serialization overhead?▼

Optimize React Server Component serialization by reducing duplicate prop payloads, shaping data carefully at client boundaries, and caching server-side work with React.cache() to eliminate redundant calculations.

How do I stop unnecessary re-renders in Next.js client components?▼

Prevent unnecessary Next.js re-renders by selecting appropriate state subscriptions, deriving state correctly, stabilizing callbacks, and using transition-based updates to keep UI responsive during heavy interactions.

Can I refactor existing Next.js pages for performance without rewriting them entirely?▼

Refactor existing Next.js pages safely by applying targeted rule sets to specific components or routes, translating identified anti-patterns like sequential awaits and bloated imports into high-impact optimization patterns incrementally.