ディレクトリ構成
よく使う主な構成です。
src/
├── components/ ベースとなる汎用UIを管理する場所
│ ├── Button/
│ │ ├── index.tsx
│ │ └── ...
│ ├── Input/
│ │ ├── index.tsx
│ │ └── ...
│ ├── index.ts
│ └── ...
├── features/ 機能ごとの関数を管理する場所
│ ├── auth/
│ │ ├── components/
│ │ │ └── ...
│ │ ├── hooks/
│ │ │ └── ...
│ │ ├── utils/
│ │ │ └── ...
│ │ └── index.ts
│ ├── SomeComponent/ 共通コンポーネントとその特化実装を管理する場合
│ │ ├── SomeComponent.tsx
│ │ ├── SomeComponent.stories.tsx
│ │ ├── index.ts
│ │ └── patterns/ 特化実装パターン
│ │ ├── pattern-a/
│ │ │ ├── PatternAComponent.tsx
│ │ │ ├── PatternAComponent.stories.tsx
│ │ │ └── index.ts
│ │ └── pattern-b/
│ │ ├── PatternBComponent.tsx
│ │ ├── PatternBComponent.stories.tsx
│ │ └── index.ts