React native components
Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/react-native-components
Modern component patterns using function components and composition. Use when building or refactoring React Native function components and composable UI. (triggers: **/*.tsx, **/*.jsx, component, props, children, composition, presentational, container)From its SKILL.md
npx -y skills add ComeOnOliver/skillshub --skill react-native-componentsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.5 KB, 280 tokens by cl100k_base, as published. Nobody here has run it
React Native Components
Priority: P0 (CRITICAL)
Standards for building scalable, maintainable components.
Implementation Guidelines
- Function Components Only: Use hooks. No class components.
- Container/Presentational: Separate logic (hooks, data fetching) from UI (JSX, styling).
- Composition: Use
childrenprop. Prefer composition over prop drilling. - Props: TypeScript interfaces. Destructure in params.
- File Size: Keep components < 250 lines. Split if larger.
- One Component Per File: Named exports for components.
- Naming:
PascalCasefor components.use*for hooks. - Imports: Group - React → External → Internal → Styles.
- Platform Components: Use built-in (
View,Text,TouchableOpacity). Avoid DOM (div,span).
Anti-Patterns
- No Classes: Use hooks instead.
- No Nested Components: Define at top level.
- No Inline Styles: Use
StyleSheet.create. - No Index Keys: Use stable IDs.
- No Deep Nesting: Max 3 levels.
References
See references/patterns.md for Container/Presentational split, HOCs, Render Props, Compound Components, and Slot patterns.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.