install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/react-native-elements" ~/.claude/skills/comeonoliver-skillshub-react-native-elements && rm -rf "$T"
manifest:
skills/pproenca/dot-skills/react-native-elements/SKILL.mdsource content
Community React Native Elements Best Practices
Comprehensive best practices guide for React Native Elements applications. Contains 45 rules across 8 categories, prioritized by impact to guide component usage, theming, and performance optimization.
When to Apply
Reference these guidelines when:
- Setting up React Native Elements in a new project
- Configuring ThemeProvider and createTheme
- Building lists with ListItem components
- Implementing form inputs with Input and SearchBar
- Optimizing FlatList performance with RNE components
- Reviewing code using React Native Elements
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Import & Setup | CRITICAL | |
| 2 | Theme Architecture | CRITICAL | |
| 3 | Component Selection | HIGH | |
| 4 | List Performance | HIGH | |
| 5 | Props & Configuration | MEDIUM-HIGH | |
| 6 | Styling Patterns | MEDIUM | |
| 7 | Callbacks & Events | MEDIUM | |
| 8 | Advanced Patterns | LOW | |
Quick Reference
1. Import & Setup (CRITICAL)
- Wrap app with ThemeProvider for consistent themingsetup-themeprovider
- Use @rneui/themed vs @rneui/base correctlysetup-imports
- Type-safe theme configuration with createThemesetup-createtheme
- Enable proper tree-shaking for bundle sizesetup-tree-shaking
- Configure SafeAreaProvider for notched devicessetup-safe-area
2. Theme Architecture (CRITICAL)
- Access theme reactively with useThemetheme-usetheme-hook
- Configure light/dark mode with createThemetheme-dark-mode
- Set component defaults in themetheme-component-defaults
- Runtime theme updates without remounttheme-updatetheme
- Sync with system color schemetheme-color-scheme
- Extend theme with custom colors safelytheme-custom-colors
3. Component Selection (HIGH)
- Use ListItem for list rowscomp-listitem-over-view
- Use Input for form fieldscomp-input-over-textinput
- Platform-specific SearchBar variantscomp-searchbar-platform
- Use Button type prop for variantscomp-button-type
- Choose Icon type wisely for bundle sizecomp-icon-source
- Use Avatar for profile imagescomp-avatar-vs-image
4. List Performance (HIGH)
- Memoize ListItem in FlatListlist-memo-items
- Always provide keyExtractorlist-keyextractor
- Use getItemLayout for fixed heightslist-getitemlayout
- Extract renderItem with useCallbacklist-renderitem-callback
- Configure windowSize for memory balancelist-windowsize
- Use FlatList over ScrollViewlist-virtualized
- Configure removeClippedSubviews carefullylist-removeClipped
5. Props & Configuration (MEDIUM-HIGH)
- Use loading prop for async operationsprops-loading-state
- Configure disabledStyle for feedbackprops-disabled-styling
- Use errorMessage for validationprops-input-validation
- Configure Icon props correctlyprops-icon-configuration
- Show loading state in SearchBarprops-searchbar-loading
- Use color prop for semantic colorsprops-button-color
6. Styling Patterns (MEDIUM)
- Use StyleSheet.create over inline objectsstyle-stylesheet
- Use containerStyle for wrappersstyle-containerStyle
- Memoize dynamic stylesstyle-usememo-dynamic
- Use theme colors over hardcoded valuesstyle-theme-colors
- Prefer component-specific style propsstyle-component-props
7. Callbacks & Events (MEDIUM)
- Wrap handlers in useCallbackevent-usecallback
- Debounce SearchBar onChangeTextevent-debounce-search
- Pass item data correctlyevent-listitem-onpress
- Avoid anonymous functions in rendersevent-avoid-anonymous
- Configure Input handlers efficientlyevent-input-handlers
8. Advanced Patterns (LOW)
- Wrap RNE components correctlyadv-custom-component
- Handle platform-specific propsadv-platform-specific
- Use makeStyles for theme-aware stylesadv-makeStyles
- Choose Overlay vs Modal correctlyadv-overlay-modal
- Configure Avatar ImageComponent for cachingadv-image-component
How to Use
Read individual reference files for detailed explanations and code examples:
- Section definitions - Category structure and impact levels
- Rule template - Template for adding new rules
Reference Files
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |