スキル一覧に戻る
cityfish91159

react-perf-perfection

by cityfish91159

0🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: react_perf_perfection description: A "No-Compromise" React performance checklist enforcing strict re-render discipline and bundle auditing. allowed-tools: Read, Edit

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?).

2. 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).

3. 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.

4. 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?

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です