react_perf_perfection

React Performance Perfection Protocol

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "react_perf_perfection" with this command: npx skills add cityfish91159/maihouses/cityfish91159-maihouses-react-perf-perfection

React Performance Perfection Protocol

  1. Re-render Police
  • Strict Rule: Every useEffect , useCallback , and useMemo must have a justified dependency array.

  • Check:

  • Are object/array props creating new references on every render? -> Use useMemo .

  • Are function props defined inline? -> Move to useCallback or outside component.

  • Tool: If available, use React DevTools Profiler mental model (Why did this render?).

  1. Bundle Diet
  • Strict Rule: No "Barrel File" imports for massive libraries (e.g., import { X } from 'lodash' ). Use direct paths (import X from 'lodash/X' ) unless tree-shaking is verified.

  • Images: No import img from './large.png' . Use lazy loading or external hosting.

  • Lazy Loading: Route-level components MUST be lazy loaded (React.lazy ).

  1. The "Interaction to Next Paint" (INP) Rule
  • Heavy computations (>50ms) must strictly be wrapped in useTransition or moved to a Web Worker.

  • Blocking the main thread for UI updates is Forbidden.

  1. Checklist Before Edit
  • Will this change cause a parent re-render?

  • Am I importing a huge library for a small utility?

  • Is this state strictly local, or am I polluting the global store?

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

pre-commit-validator

No summary provided by upstream source.

Repository SourceNeeds Review
General

frontend_mastery

No summary provided by upstream source.

Repository SourceNeeds Review
General

memory_bank

No summary provided by upstream source.

Repository SourceNeeds Review
General

rigorous_testing

No summary provided by upstream source.

Repository SourceNeeds Review