How dannyhw/react-native-storybook-starter works
Main Components
a. Development Environment Layer:
• Metro Bundler (React Native packager)
• Storybook Server
• Yarn Package Manager
b. Platform Layers:
• iOS Runtime Environment
• Android Runtime Environment
• Web Browser Environment (via react-native-web)
c. Application Components:
• React Native Core
• Component Library (starting with Button component)
• Storybook Integration
• Testing Infrastructure (Jest)
┌─────────────────────────────────────────┐
• Development Environment │
• ┌─────────┐ ┌──────────┐ ┌──────────┐ │
• Yarn │ │ Metro │ │Storybook │ │
• Package │ │ Bundler │ │ Server │ │
• ┘ └──────────┘ └──────────┘ │
• ┘
┌─────────────────────────────────────────┐
• Application Core │
• ┌─────────────┐ ┌───────────────────┐ │
• React Native│ │ Component Library │ │
• Core │ │ - Button │ │
• ┘ └───────────────────┘ │
• ┘
┌───────────┐ ┌───────────┐ ┌───────────┐
• iOS │ │ Android │ │ Web │
• Runtime │ │ Runtime │ │ Browser │
• ┘ └───────────┘ └───────────┘
Connection Flows
• Metro Bundler → Platform Runtimes (bundle delivery)
• Storybook Server → All Platforms (component preview)
• Component Library → Storybook (story generation)
Additional Details
• File structure organization
• Build processes
• Development workflows
• Testing procedures
• The dual nature of the project (development/preview via Storybook and actual app runtime)
• Cross-platform capabilities
• Component development workflow
• The relationship between Metro bundler and Storybook
Remember to include version numbers for key dependencies:
• React Native: 0.75.3
• Storybook: 8.x
• React Native Web Addon
This will help other developers understand the compatibility requirements and technical constraints of the system.