File contents 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
setup-
2
Theme Architecture
CRITICAL
theme-
3
Component Selection
HIGH
comp-
4
List Performance
HIGH
list-
5
Props & Configuration
MEDIUM-HIGH
props-
6
Styling Patterns
MEDIUM
style-
7
Callbacks & Events
MEDIUM
event-
8
Advanced Patterns
LOW
adv-
Quick Reference
1. Import & Setup (CRITICAL)
setup-themeprovider - Wrap app with ThemeProvider for consistent theming
setup-imports - Use @rneui/themed vs @rneui/base correctly
setup-createtheme - Type-safe theme configuration with createTheme
setup-tree-shaking - Enable proper tree-shaking for bundle size
setup-safe-area - Configure SafeAreaProvider for notched devices
2. Theme Architecture (CRITICAL)
theme-usetheme-hook - Access theme reactively with useTheme
theme-dark-mode - Configure light/dark mode with createTheme
theme-component-defaults - Set component defaults in theme
theme-updatetheme - Runtime theme updates without remount
theme-color-scheme - Sync with system color scheme
theme-custom-colors - Extend theme with custom colors safely
3. Component Selection (HIGH)
comp-listitem-over-view - Use ListItem for list rows
comp-input-over-textinput - Use Input for form fields
comp-searchbar-platform - Platform-specific SearchBar variants
comp-button-type - Use Button type prop for variants
comp-icon-source - Choose Icon type wisely for bundle size
comp-avatar-vs-image - Use Avatar for profile images
4. List Performance (HIGH)
list-memo-items - Memoize ListItem in FlatList
list-keyextractor - Always provide keyExtractor
list-getitemlayout - Use getItemLayout for fixed heights
list-renderitem-callback - Extract renderItem with useCallback
list-windowsize - Configure windowSize for memory balance
list-virtualized - Use FlatList over ScrollView
list-removeClipped - Configure removeClippedSubviews carefully
5. Props & Configuration (MEDIUM-HIGH)
props-loading-state - Use loading prop for async operations
props-disabled-styling - Configure disabledStyle for feedback
props-input-validation - Use errorMessage for validation
props-icon-configuration - Configure Icon props correctly
props-searchbar-loading - Show loading state in SearchBar
props-button-color - Use color prop for semantic colors
6. Styling Patterns (MEDIUM)
style-stylesheet - Use StyleSheet.create over inline objects
style-containerStyle - Use containerStyle for wrappers
style-usememo-dynamic - Memoize dynamic styles
style-theme-colors - Use theme colors over hardcoded values
style-component-props - Prefer component-specific style props
7. Callbacks & Events (MEDIUM)
event-usecallback - Wrap handlers in useCallback
event-debounce-search - Debounce SearchBar onChangeText
event-listitem-onpress - Pass item data correctly
event-avoid-anonymous - Avoid anonymous functions in renders
event-input-handlers - Configure Input handlers efficiently
8. Advanced Patterns (LOW)
adv-custom-component - Wrap RNE components correctly
adv-platform-specific - Handle platform-specific props
adv-makeStyles - Use makeStyles for theme-aware styles
adv-overlay-modal - Choose Overlay vs Modal correctly
adv-image-component - Configure Avatar ImageComponent for caching
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
1 --- 2 name: react-native-elements 3 description: Community React Native Elements Best Practices 4 --- 5 # Community React Native Elements Best Practices 6 7 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. 8 9 ## When to Apply 10 11 Reference these guidelines when: 12 - Setting up React Native Elements in a new project 13 - Configuring ThemeProvider and createTheme 14 - Building lists with ListItem components 15 - Implementing form inputs with Input and SearchBar 16 - Optimizing FlatList performance with RNE components 17 - Reviewing code using React Native Elements 18 19 ## Rule Categories by Priority 20 21 | Priority | Category | Impact | Prefix | 22 |----------|----------|--------|--------| 23 | 1 | Import & Setup | CRITICAL | `setup-` | 24 | 2 | Theme Architecture | CRITICAL | `theme-` | 25 | 3 | Component Selection | HIGH | `comp-` | 26 | 4 | List Performance | HIGH | `list-` | 27 | 5 | Props & Configuration | MEDIUM-HIGH | `props-` | 28 | 6 | Styling Patterns | MEDIUM | `style-` | 29 | 7 | Callbacks & Events | MEDIUM | `event-` | 30 | 8 | Advanced Patterns | LOW | `adv-` | 31 32 ## Quick Reference 33 34 ### 1. Import & Setup (CRITICAL) 35 36 - [`setup-themeprovider`](references/setup-themeprovider.md) - Wrap app with ThemeProvider for consistent theming 37 - [`setup-imports`](references/setup-imports.md) - Use @rneui/themed vs @rneui/base correctly 38 - [`setup-createtheme`](references/setup-createtheme.md) - Type-safe theme configuration with createTheme 39 - [`setup-tree-shaking`](references/setup-tree-shaking.md) - Enable proper tree-shaking for bundle size 40 - [`setup-safe-area`](references/setup-safe-area.md) - Configure SafeAreaProvider for notched devices 41 42 ### 2. Theme Architecture (CRITICAL) 43 44 - [`theme-usetheme-hook`](references/theme-usetheme-hook.md) - Access theme reactively with useTheme 45 - [`theme-dark-mode`](references/theme-dark-mode.md) - Configure light/dark mode with createTheme 46 - [`theme-component-defaults`](references/theme-component-defaults.md) - Set component defaults in theme 47 - [`theme-updatetheme`](references/theme-updatetheme.md) - Runtime theme updates without remount 48 - [`theme-color-scheme`](references/theme-color-scheme.md) - Sync with system color scheme 49 - [`theme-custom-colors`](references/theme-custom-colors.md) - Extend theme with custom colors safely 50 51 ### 3. Component Selection (HIGH) 52 53 - [`comp-listitem-over-view`](references/comp-listitem-over-view.md) - Use ListItem for list rows 54 - [`comp-input-over-textinput`](references/comp-input-over-textinput.md) - Use Input for form fields 55 - [`comp-searchbar-platform`](references/comp-searchbar-platform.md) - Platform-specific SearchBar variants 56 - [`comp-button-type`](references/comp-button-type.md) - Use Button type prop for variants 57 - [`comp-icon-source`](references/comp-icon-source.md) - Choose Icon type wisely for bundle size 58 - [`comp-avatar-vs-image`](references/comp-avatar-vs-image.md) - Use Avatar for profile images 59 60 ### 4. List Performance (HIGH) 61 62 - [`list-memo-items`](references/list-memo-items.md) - Memoize ListItem in FlatList 63 - [`list-keyextractor`](references/list-keyextractor.md) - Always provide keyExtractor 64 - [`list-getitemlayout`](references/list-getitemlayout.md) - Use getItemLayout for fixed heights 65 - [`list-renderitem-callback`](references/list-renderitem-callback.md) - Extract renderItem with useCallback 66 - [`list-windowsize`](references/list-windowsize.md) - Configure windowSize for memory balance 67 - [`list-virtualized`](references/list-virtualized.md) - Use FlatList over ScrollView 68 - [`list-removeClipped`](references/list-removeClipped.md) - Configure removeClippedSubviews carefully 69 70 ### 5. Props & Configuration (MEDIUM-HIGH) 71 72 - [`props-loading-state`](references/props-loading-state.md) - Use loading prop for async operations 73 - [`props-disabled-styling`](references/props-disabled-styling.md) - Configure disabledStyle for feedback 74 - [`props-input-validation`](references/props-input-validation.md) - Use errorMessage for validation 75 - [`props-icon-configuration`](references/props-icon-configuration.md) - Configure Icon props correctly 76 - [`props-searchbar-loading`](references/props-searchbar-loading.md) - Show loading state in SearchBar 77 - [`props-button-color`](references/props-button-color.md) - Use color prop for semantic colors 78 79 ### 6. Styling Patterns (MEDIUM) 80 81 - [`style-stylesheet`](references/style-stylesheet.md) - Use StyleSheet.create over inline objects 82 - [`style-containerStyle`](references/style-containerStyle.md) - Use containerStyle for wrappers 83 - [`style-usememo-dynamic`](references/style-usememo-dynamic.md) - Memoize dynamic styles 84 - [`style-theme-colors`](references/style-theme-colors.md) - Use theme colors over hardcoded values 85 - [`style-component-props`](references/style-component-props.md) - Prefer component-specific style props 86 87 ### 7. Callbacks & Events (MEDIUM) 88 89 - [`event-usecallback`](references/event-usecallback.md) - Wrap handlers in useCallback 90 - [`event-debounce-search`](references/event-debounce-search.md) - Debounce SearchBar onChangeText 91 - [`event-listitem-onpress`](references/event-listitem-onpress.md) - Pass item data correctly 92 - [`event-avoid-anonymous`](references/event-avoid-anonymous.md) - Avoid anonymous functions in renders 93 - [`event-input-handlers`](references/event-input-handlers.md) - Configure Input handlers efficiently 94 95 ### 8. Advanced Patterns (LOW) 96 97 - [`adv-custom-component`](references/adv-custom-component.md) - Wrap RNE components correctly 98 - [`adv-platform-specific`](references/adv-platform-specific.md) - Handle platform-specific props 99 - [`adv-makeStyles`](references/adv-makeStyles.md) - Use makeStyles for theme-aware styles 100 - [`adv-overlay-modal`](references/adv-overlay-modal.md) - Choose Overlay vs Modal correctly 101 - [`adv-image-component`](references/adv-image-component.md) - Configure Avatar ImageComponent for caching 102 103 ## How to Use 104 105 Read individual reference files for detailed explanations and code examples: 106 107 - [Section definitions](references/_sections.md) - Category structure and impact levels 108 - [Rule template](assets/templates/_template.md) - Template for adding new rules 109 110 ## Reference Files 111 112 | File | Description | 113 |------|-------------| 114 | [references/_sections.md](references/_sections.md) | Category definitions and ordering | 115 | [assets/templates/_template.md](assets/templates/_template.md) | Template for new rules | 116 | [metadata.json](metadata.json) | Version and reference information |
ComeOnOliver/skillshub/tree/main/skills/pproenca/dot-skills/react-native-elements commit 8239daa1ba
Frequently asked questions How do I install the React Native Elements skill? Run npx skillmds@latest add comeonoliver/react-native-elements in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the React Native Elements skill do? Community React Native Elements Best Practices It is listed under Web & Frontend on SkillMD.
Is React Native Elements safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with React Native Elements? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is React Native Elements free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published React Native Elements? ComeOnOliver (@comeonoliver) published this skill. Their other Agent Skills are listed on their SkillMD profile.