vercel-react-native-skills
Original:🇺🇸 English
Translated
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
13.3kinstalls
View GitHub RepositoryAdded on
SKILL.md Content
View Translation Comparison →React Native Skills
Comprehensive best practices for React Native and Expo applications. Contains
rules across multiple categories covering performance, animations, UI patterns,
and platform-specific optimizations.
When to Apply
Reference these guidelines when:
- Building React Native or Expo apps
- Optimizing list and scroll performance
- Implementing animations with Reanimated
- Working with images and media
- Configuring native modules or fonts
- Structuring monorepo projects with native dependencies
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | List Performance | CRITICAL | |
| 2 | Animation | HIGH | |
| 3 | Navigation | HIGH | |
| 4 | UI Patterns | HIGH | |
| 5 | State Management | MEDIUM | |
| 6 | Rendering | MEDIUM | |
| 7 | Monorepo | MEDIUM | |
| 8 | Configuration | LOW | |
Quick Reference
1. List Performance (CRITICAL)
- - Use FlashList for large lists
list-performance-virtualize - - Memoize list item components
list-performance-item-memo - - Stabilize callback references
list-performance-callbacks - - Avoid inline style objects
list-performance-inline-objects - - Extract functions outside render
list-performance-function-references - - Optimize images in lists
list-performance-images - - Move expensive work outside items
list-performance-item-expensive - - Use item types for heterogeneous lists
list-performance-item-types
2. Animation (HIGH)
- - Animate only transform and opacity
animation-gpu-properties - - Use useDerivedValue for computed animations
animation-derived-value - - Use Gesture.Tap instead of Pressable
animation-gesture-detector-press
3. Navigation (HIGH)
- - Use native stack and native tabs over JS navigators
navigation-native-navigators
4. UI Patterns (HIGH)
- - Use expo-image for all images
ui-expo-image - - Use Galeria for image lightboxes
ui-image-gallery - - Use Pressable over TouchableOpacity
ui-pressable - - Handle safe areas in ScrollViews
ui-safe-area-scroll - - Use contentInset for headers
ui-scrollview-content-inset - - Use native context menus
ui-menus - - Use native modals when possible
ui-native-modals - - Use onLayout, not measure()
ui-measure-views - - Use StyleSheet.create or Nativewind
ui-styling
5. State Management (MEDIUM)
- - Minimize state subscriptions
react-state-minimize - - Use dispatcher pattern for callbacks
react-state-dispatcher - - Show fallback on first render
react-state-fallback - - Destructure for React Compiler
react-compiler-destructure-functions - - Handle shared values with compiler
react-compiler-reanimated-shared-values
6. Rendering (MEDIUM)
- - Wrap text in Text components
rendering-text-in-text-component - - Avoid falsy && for conditional rendering
rendering-no-falsy-and
7. Monorepo (MEDIUM)
- - Keep native dependencies in app package
monorepo-native-deps-in-app - - Use single versions across packages
monorepo-single-dependency-versions
8. Configuration (LOW)
- - Use config plugins for custom fonts
fonts-config-plugin - - Organize design system imports
imports-design-system-folder - - Hoist Intl object creation
js-hoist-intl
How to Use
Read individual rule files for detailed explanations and code examples:
rules/list-performance-virtualize.md
rules/animation-gpu-properties.mdEach rule file contains:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- Additional context and references
Full Compiled Document
For the complete guide with all rules expanded:
AGENTS.md