How reutenkoivan/react-control-flow works
Main Components Overview
• Component
• For Component
• SwitchMap Component
Component Architecture
┌─ React Control Flow Library ─────────────────────┐
• ┌─ Public API ──────────────────────────────┐ │
• Show │ │
• For │ │
• SwitchMap │ │
• ┌─ Core Components ───────────────────────┐ │ │
• ┌─ Show ─────┐ ┌─ For ──────┐ │ │ │
• Props: │ │ Props: │ │ │ │
• when │ │ - of │ │ │ │
• fallback │ │ - children │ │ │ │
• children │ │ - keyMapper│ │ │ │
• ┘ │ - loading │ │ │ │
• slots │ │ │ │
• ┘ │ │ │
• ┌─ SwitchMap ─────┐ │ │ │
• Props: │ │ │ │
• case │ │ │ │
• default │ │ │ │
• children │ │ │ │
• ┘ │ │ │
• ┌─ Utils ────────────────────────────┐ │ │
• genericMemo │ │ │
• ┘
Development Infrastructure
A separate section showing:
• Build System (Vite)
• Testing Framework (Storybook)
• CI/CD Pipeline (.github/workflows)