From react-best-practices
Comprehensive React and Next.js performance optimization guide with 40+ rules for eliminating waterfalls, optimizing bundles, and improving rendering. Use when optimizing React apps, reviewing performance, or refactoring components.
npx claudepluginhub window-ook/claude-code-lab --plugin react-best-practicesThis skill uses the workspace's default tool permissions.
Comprehensive performance optimization guide for React and Next.js applications with 40+ rules organized by impact level. Designed to help developers eliminate performance bottlenecks and follow best practices.
references/react-performance-guidelines.mdreferences/rules/_sections.mdreferences/rules/_template.mdreferences/rules/advanced-event-handler-refs.mdreferences/rules/advanced-use-latest.mdreferences/rules/async-api-routes.mdreferences/rules/async-defer-await.mdreferences/rules/async-dependencies.mdreferences/rules/async-parallel.mdreferences/rules/async-suspense-boundaries.mdreferences/rules/bundle-barrel-imports.mdreferences/rules/bundle-conditional.mdreferences/rules/bundle-defer-third-party.mdreferences/rules/bundle-dynamic-imports.mdreferences/rules/bundle-preload.mdreferences/rules/client-event-listeners.mdreferences/rules/client-swr-dedup.mdreferences/rules/download_rules.shreferences/rules/js-batch-dom-css.mdreferences/rules/js-cache-function-results.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Compresses source documents into lossless, LLM-optimized distillates preserving all facts and relationships. Use for 'distill documents' or 'create distillate' requests.
Comprehensive performance optimization guide for React and Next.js applications with 40+ rules organized by impact level. Designed to help developers eliminate performance bottlenecks and follow best practices.
Use React Best Practices when:
Key areas covered:
Parallel data fetching:
const [user, posts, comments] = await Promise.all([
fetchUser(),
fetchPosts(),
fetchComments()
])
Direct imports:
// ❌ Loads entire library
import { Check } from 'lucide-react'
// ✅ Loads only what you need
import Check from 'lucide-react/dist/esm/icons/check'
Dynamic components:
import dynamic from 'next/dynamic'
const MonacoEditor = dynamic(
() => import('./monaco-editor'),
{ ssr: false }
)
The complete performance guidelines are available in the references folder:
Each rule includes:
Waterfalls are the #1 performance killer. Each sequential await adds full network latency.
Reducing initial bundle size improves Time to Interactive and Largest Contentful Paint.
Optimize server-side rendering and data fetching.
Automatic deduplication and efficient data fetching patterns.
Reduce unnecessary re-renders to minimize wasted computation.
Optimize the browser rendering process.
Micro-optimizations for hot paths.
Specialized techniques for edge cases.
When optimizing a React application:
❌ Don't:
✅ Do:
v0.1.0 (January 2026)