Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
smithery.ai avatar

React Best Practices

  • 47 installs
  • smithery.ai

Helps with frontend development tasks during AI-assisted development.

About

react-best-practices is a Claude Code skill for frontend development. It helps solo builders move faster with AI-assisted coding.

  • react-best-practices
  • Frontend Development
  • AI-coding skill

React Best Practices by the numbers

  • 47 all-time installs (skills.sh)
  • Ranked #1,322 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/smithery.ai --skill react-best-practices

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs47
Repositorysmithery.ai

What it does

Helps with frontend development tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

React Best Practices

Client-side React optimization patterns for Cloud UI. 29 rules organized by category and impact.

Activation Conditions

  • Performance optimization tasks
  • Component re-render issues
  • Bundle size concerns
  • useEffect/useMemo patterns

Rules by Category

Bundle Optimization (CRITICAL)

RuleKey Point
bundle-barrel-importsImport from source files, not barrel index.ts
bundle-code-splittingReact.lazy + Suspense for heavy components, conditional loads, deferred 3rd-party
bundle-preloadPreload critical resources

Re-render Prevention (HIGH)

RuleKey Point
rerender-memoMemoize expensive computations
rerender-dependenciesMinimize hook dependency arrays
rerender-derived-stateCompute during render, not in effects
rerender-functional-setstatesetState(prev => ...) to avoid stale closures
rerender-lazy-state-inituseState(() => expensive()) not useState(expensive())
rerender-simple-expression-in-memoDon't memoize trivial expressions
rerender-transitionsuseTransition for non-urgent updates
rerender-defer-readsRead URL params / storage inside callbacks, not at render

Rendering (MEDIUM)

RuleKey Point
rendering-conditional-renderShort-circuit with && / ternary, avoid render in effects
rendering-hoist-jsxMove static JSX outside components
rendering-content-visibilityCSS content-visibility: auto for off-screen
rendering-activityReact <Activity> for hidden UI
rendering-animate-svg-wrapperWrap animated SVGs to isolate re-renders
rendering-svg-precisionLimit SVG coordinate precision

Async (MEDIUM)

RuleKey Point
async-suspense-boundariesGranular <Suspense> boundaries
async-defer-awaitDon't await non-blocking work
async-dependenciesLoad deps in parallel, not sequentially

JavaScript (MEDIUM)

RuleKey Point
js-caching-patternsModule-level Map caches for repeated calls + storage reads
js-batch-dom-cssBatch DOM reads/writes to avoid layout thrashing
js-index-mapsPre-index arrays into Maps for O(1) lookups
js-length-check-firstCheck .length before expensive operations
js-tosorted-immutableUse .toSorted() / .toReversed() for immutable transforms

RegExp hoisting is enforced by Biome (useTopLevelRegex).

Browser (MEDIUM)

RuleKey Point
client-event-listenersClean up event listeners in useEffect return
client-passive-event-listeners{ passive: true } for scroll/touch handlers

Advanced (LOW)

RuleKey Point
advanced-event-handler-refsStable callback refs to avoid child re-renders
advanced-use-latestuseLatest pattern for always-current values in callbacks

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.