What problem does it solve?
This Skill prevents messy, hard-to-test React Native code by enforcing consistent component structure, state management, and testing practices across iOS and Android.
Core Features & Use Cases
- Functional component patterns: Encourages presentation components with explicit props to keep UI predictable.
- Logic extraction to hooks: Moves side effects and data fetching into hooks so screens remain focused and easy to test.
- State management guidance: Recommends local state first, then Zustand for global state, and React Query for server state.
- Testing strategies: Covers component and hook testing with React Native Testing Library patterns.
- Platform-specific organization: Uses iOS/Android file splits and minimizes Platform.select to reduce conditional complexity.
- Use cases: When building a new screen (e.g., Home) with data loading, when adding server-backed features (e.g., creating items), or when implementing platform-specific UI differences safely.
Quick Start
Ask an AI to refactor your current React Native screen to follow the Skill’s patterns by extracting logic into hooks, standardizing props interfaces, choosing the correct state tool, and adding targeted tests for the critical components.