Frontend React Best Practices
React performance rules and composition patterns covering re-renders, bundle size, and hydration pitfalls.
- CCM score
- 59 of 100
- skills.sh installs
- 1.2K
- GitHub stars
- 92
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers 33 rules across six categories: bundle size, re-render optimization, rendering performance, and related React patterns
- Includes code examples contrasting bad and good patterns for barrel imports, lazy setState, memoization, and
startTransition - Enforces direct source imports, derived state computed during render, and event-handler logic instead of effects
- Designed for reviewing and refactoring React components where render cost and bundle weight matter
Install
$ npx -y skills add sergiodxa/agent-skills --skill frontend-react-best-practices -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
React Best Practices
Performance optimization and composition patterns for React components. Contains 33 rules across 6 categories focused on reducing re-renders, optimizing bundles, component composition, and avoiding common React pitfalls.
When to Apply
Reference these guidelines when:
- Writing new React components
- Reviewing code for performance issues
- Refactoring existing React code
- Optimizing bundle size
- Working with hooks and state
Rules Summary
Bundle Size Optimization (CRITICAL)
bundle-barrel-imports - @rules/bundle-barrel-imports.md
Import directly from source, avoid barrel files.
// Bad: loads entire library (200-800ms)
import { Check, X } from "lucide-react";
// Good: loads only what you need
import Check from "lucide-react/dist/esm/icons/check";
import X from "lucide-react/dist/esm/icons/x";
bundle-conditional - @rules/bundle-conditional.md
Load modules only when feature is activated.
useEffect(() => {
if (enabled && typeof window !== "undefined") {
import("./heavy-module").then((mod) => setModule(mod));
}
}, [enabled]);
bundle-preload - @rules/bundle-preload.md
Details
- Repository
- github.com/sergiodxa/agent-skills
- Categories
- Frontend & UI Code, Code Review & Quality
- First seen
- Apr 16, 2026
More from sergiodxa/agent-skills
All 10- Frontend Accessibility Best Practices929
- Frontend Tailwind Best Practices472
- Frontend React Router Best Practices406
- Frontend Js Best Practices341
- Ruby On Rails Best Practices283
- Frontend Async Best Practices228
- Frontend Internationalization Best Practices195
- Frontend Testing Best Practices2.3K
- Owasp Security Check1.8K
Similar to Frontend React Best Practices
More Frontend & UI Codereact-best-practicesmastra-ai/mastra2.9K installsAuthoritative React performance guide routing 27 rules across nine prioritized categories for writing and reviewing components.
vercel-react-best-practicesvercel-labs/agent-skills929.5K installsPerformance guide of 70 React and Next.js rules, ordered by impact from waterfalls to advanced patterns.
react-performanceaffaan-m/ecc8.5K installsPerformance patterns for React and Next.js, organized into eight priority categories with rules for reviews and refactors.
react-patternsjezweb/claude-skills1.3K installsReact 19 performance patterns and composition rules that prioritise waterfalls, bundle size, and re-render prevention.
react-render-optimizationpatternsdev/skills1.2K installsPractical React performance patterns for eliminating needless re-renders, memoization misuse, and redundant state.
r3f-best-practicesemalorenzo/three-agent-skills1.8K installsComprehensive React Three Fiber and Poimandres ecosystem best practices, prioritized by performance impact.