How chooin/react-native-lifecycle works
Main Components Structure
a. Application Layer (Global Hooks)
• Their connection to React Native's AppState
b. Screen/Page Layer (Component Hooks)
• UseMount, useShow, useHide, useUnmount, and useResize
• Their connection to React Navigation
Component Relationships
• [React Native Core] ─────────────────────┐
• ↑ │
• [React Navigation] ←──────────────┐ │
• ↑ │ │
• [React Native Lifecycle Library] │ │
• Global Hooks ────────┘ │
• useAppActive ─────────┘
• useAppInactive ───────┘
• Page/Screen Hooks
• useMount
• useShow
• useHide
• useUnmount
• useResize
Important Elements
a. Dependencies Section:
• React Navigation as a peer dependency
• Version compatibility (RN 0.65.0+ for v2.0.0+)
b. Hook Flow Section:
• How hooks interact with React Navigation and AppState
c. Event Propagation:
• How events flow from React Native core to the hooks
• Bi-directional communication where applicable
Technical Details to Highlight
• TypeScript implementation (shown by .ts files)
• Build pipeline (babel, jest, api-extractor)
• GitHub Actions integration for CI/CD
• Package distribution flow
Remember to include a small section showing the build and distribution pipeline, as indicated by the presence of build scripts and configuration files in the project structure.