frontend-dev

フロントエンド開発(React/TypeScript)のベストプラクティスと規約

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 29, 2025

When & Why to Use This Skill

This Claude skill provides a comprehensive framework for React and TypeScript frontend development, focusing on industry best practices and coding conventions. It streamlines the development process by offering clear guidelines on component architecture, state management, and performance optimization, ensuring code maintainability, scalability, and high-quality user experiences.

Use Cases

  • Standardizing Code Quality: Enforce consistent coding patterns and architectural decisions across React/TypeScript projects to ensure long-term maintainability.
  • Automated Code Audits: Leverage the built-in implementation checklist to perform rigorous reviews, identifying anti-patterns in hook usage (useEffect), memoization, and type definitions.
  • Performance Optimization: Apply specialized strategies for client-side caching and state encapsulation to minimize unnecessary re-renders and improve application speed.
  • UX and Accessibility Compliance: Use the guidelines to ensure UI components meet accessibility (a11y) standards and provide clear, actionable feedback to users.
namefrontend-dev
descriptionフロントエンド開発(React/TypeScript)のベストプラクティスと規約

フロントエンドのコーディング規約

  • コンポーネント設計: UI はコンポーネントベースで構築し、再利用可能な構造を保つ。
  • 状態管理: 状態管理は一元化し、コンポーネントは必要最小限のデータのみを購読する。UI 固有の状態はコンポーネント内部でカプセル化し、過剰なグローバル状態共有を避ける。
  • ロジック分離: ビジネスロジックは DOM 操作から切り離し、データ駆動型の UI 更新を行う。
  • キャッシュ戦略: クライアントキャッシュを活用し、リアルタイム更新が不要なデータはsessionStorageやlocalStorageで保持する。
  • UX/UI:
    • エラーメッセージは具体的で、ユーザーに理解と行動を促す内容とする。
    • 成功状態は過剰に通知せず、明確な視覚的フィードバックを重視する。

実装チェックリスト

  • コンポーネントは小さく、単一責任になっているか
  • useEffect の依存配列は正しいか
  • メモ化(useMemo, useCallback)は適切に使用されているか
  • アクセシビリティ(a11y)は考慮されているか(aria 属性など)
  • レスポンシブデザインは崩れていないか
  • 型定義(Props, State)は明示的か
  • ハードコードされた文字列はなく、定数や設定ファイルを使用しているか