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/expo-react-native-performance" ~/.claude/skills/comeonoliver-skillshub-expo-react-native-performance && rm -rf "$T"
manifest:
skills/pproenca/dot-skills/expo-react-native-performance/SKILL.mdsource content
Expo React Native Performance Best Practices
Comprehensive performance optimization guide for Expo React Native applications. Contains 42 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Writing new React Native components or screens
- Implementing lists with FlatList or FlashList
- Adding animations or transitions
- Optimizing images and asset loading
- Reviewing code for performance issues
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | App Startup & Bundle Size | CRITICAL | |
| 2 | List Virtualization | CRITICAL | |
| 3 | Re-render Optimization | HIGH | |
| 4 | Animation Performance | HIGH | |
| 5 | Image & Asset Loading | MEDIUM-HIGH | |
| 6 | Memory Management | MEDIUM | |
| 7 | Async & Data Fetching | MEDIUM | |
| 8 | Platform Optimizations | LOW-MEDIUM | |
Quick Reference
1. App Startup & Bundle Size (CRITICAL)
- Enable Hermes JavaScript enginestartup-enable-hermes
- Remove console logs in productionstartup-remove-console-logs
- Control splash screen visibilitystartup-splash-screen-control
- Preload critical assets during splashstartup-preload-assets
- Use async routes for code splittingstartup-async-routes
- Use direct imports instead of barrel filesstartup-cherry-pick-imports
2. List Virtualization (CRITICAL)
- Use FlashList instead of FlatListlist-use-flashlist
- Provide accurate estimatedItemSizelist-estimated-item-size
- Use getItemType for mixed listslist-get-item-type
- Stabilize renderItem with useCallbacklist-stable-render-item
- Provide getItemLayout for fixed heightslist-get-item-layout
- Memoize list item componentslist-memoize-items
3. Re-render Optimization (HIGH)
- Memoize expensive computationsrerender-use-memo-expensive
- Stabilize callbacks with useCallbackrerender-use-callback-handlers
- Use functional setState updatesrerender-functional-setstate
- Use lazy state initializationrerender-lazy-state-init
- Split context by update frequencyrerender-split-context
- Derive state instead of syncingrerender-derive-state
4. Animation Performance (HIGH)
- Enable native driver for animationsanim-use-native-driver
- Use Reanimated for complex animationsanim-use-reanimated
- Use LayoutAnimation for simple transitionsanim-layout-animation
- Animate transform instead of dimensionsanim-transform-not-dimensions
- Defer heavy work during animationsanim-interaction-manager
5. Image & Asset Loading (MEDIUM-HIGH)
- Use expo-image for image loadingasset-use-expo-image
- Prefetch images before displayasset-prefetch-images
- Request appropriately sized imagesasset-optimize-image-size
- Use WebP format for imagesasset-use-webp-format
- Use recyclingKey in FlashList imagesasset-recycling-key
6. Memory Management (MEDIUM)
- Clean up subscriptions in useEffectmem-cleanup-subscriptions
- Clear timers on unmountmem-clear-timers
- Abort fetch requests on unmountmem-abort-fetch
- Avoid inline objects in propsmem-avoid-inline-objects
- Limit list data in memorymem-limit-list-data
7. Async & Data Fetching (MEDIUM)
- Fetch independent data in parallelasync-parallel-fetching
- Defer await until value neededasync-defer-await
- Batch related API callsasync-batch-api-calls
- Cache API responses locallyasync-cache-responses
- Refetch data on screen focusasync-refetch-on-focus
8. Platform Optimizations (LOW-MEDIUM)
- Reduce Android overdrawplatform-android-overdraw
- Optimize iOS text renderingplatform-ios-text-rendering
- Enable ProGuard for Android releaseplatform-android-proguard
- Platform-specific optimizationsplatform-conditional-render
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
Full Compiled Document
For the complete guide with all rules expanded, see AGENTS.md.
Reference Files
| File | Description |
|---|---|
| AGENTS.md | Complete compiled guide with all rules |
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |