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" ~/.claude/skills/comeonoliver-skillshub-expo && rm -rf "$T"
manifest:
skills/pproenca/dot-skills/expo/SKILL.mdsource content
Community Expo React Native Best Practices
Comprehensive performance optimization guide for Expo React Native applications. Contains 54 rules across 9 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Writing new Expo React Native components
- Optimizing app startup and Time to Interactive
- Implementing lists, images, or animations
- Reducing bundle size and memory usage
- Reviewing code for mobile performance issues
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Launch Time Optimization | CRITICAL | |
| 2 | Bundle Size Optimization | CRITICAL | |
| 3 | List Virtualization | HIGH | |
| 4 | Image Optimization | HIGH | |
| 5 | Data Fetching Patterns | HIGH | |
| 6 | Navigation Performance | MEDIUM-HIGH | |
| 7 | Re-render Prevention | MEDIUM | |
| 8 | Animation Performance | MEDIUM | |
| 9 | Memory Management | LOW-MEDIUM | |
Quick Reference
1. Launch Time Optimization (CRITICAL)
- Control splash screen visibility during asset loadinglaunch-splash-screen-control
- Preload fonts and images during splashlaunch-preload-critical-assets
- Use Hermes engine for faster startuplaunch-hermes-engine
- Defer non-critical initializationlaunch-defer-non-critical
- Enable New Architecture for synchronous native communicationlaunch-new-architecture
- Minimize imports in root App componentlaunch-minimize-root-imports
2. Bundle Size Optimization (CRITICAL)
- Avoid barrel file importsbundle-avoid-barrel-files
- Analyze bundle size before releasebundle-analyze-size
- Remove unused dependenciesbundle-remove-unused-dependencies
- Generate architecture-specific APKsbundle-split-by-architecture
- Enable ProGuard for Android release buildsbundle-enable-proguard
- Subset custom fonts to used charactersbundle-optimize-fonts
- Use lightweight library alternativesbundle-use-lightweight-alternatives
3. List Virtualization (HIGH)
- Use FlashList instead of FlatListlist-use-flashlist
- Provide accurate estimatedItemSizelist-provide-estimated-size
- Avoid inline functions in renderItemlist-avoid-inline-functions
- Provide getItemLayout for fixed-height itemslist-provide-getitemlayout
- Avoid key prop inside FlashList itemslist-avoid-key-prop
- Configure list batch renderinglist-batch-rendering
- Memoize list item componentslist-memoize-item-components
4. Image Optimization (HIGH)
- Use expo-image instead of React Native Imageimage-use-expo-image
- Resize images to display sizeimage-resize-to-display-size
- Use WebP format for smaller file sizesimage-use-webp-format
- Use BlurHash or ThumbHash placeholdersimage-use-placeholders
- Preload critical above-the-fold imagesimage-preload-critical
- Lazy load off-screen imagesimage-lazy-load-offscreen
5. Data Fetching Patterns (HIGH)
- Fetch independent data in paralleldata-parallel-fetching
- Deduplicate concurrent requestsdata-request-deduplication
- Abort requests on component unmountdata-abort-requests
- Implement efficient pagination strategiesdata-pagination
- Use appropriate caching strategiesdata-cache-strategies
- Apply optimistic updates for responsivenessdata-optimistic-updates
6. Navigation Performance (MEDIUM-HIGH)
- Use native stack navigatornav-use-native-stack
- Unmount inactive tab screensnav-unmount-inactive-screens
- Prefetch data before navigationnav-prefetch-screen-data
- Optimize screen optionsnav-optimize-screen-options
- Avoid deeply nested navigatorsnav-avoid-deep-nesting
7. Re-render Prevention (MEDIUM)
- Memoize expensive components with React.memorerender-use-memo-components
- Stabilize callbacks with useCallbackrerender-use-callback
- Memoize expensive computations with useMemorerender-use-memo-values
- Avoid overusing Context for frequent updatesrerender-avoid-context-overuse
- Split components to isolate updating statererender-split-component-state
- Enable React Compiler for automatic memoizationrerender-use-react-compiler
- Avoid anonymous components in JSXrerender-avoid-anonymous-components
8. Animation Performance (MEDIUM)
- Use Reanimated for UI thread animationsanim-use-reanimated
- Enable useNativeDriver for Animated APIanim-use-native-driver
- Prefer transform over layout animationsanim-avoid-layout-animation
- Use Gesture Handler with Reanimatedanim-gesture-handler-integration
- Defer heavy work during animationsanim-interaction-manager
9. Memory Management (LOW-MEDIUM)
- Clean up subscriptions and timersmem-cleanup-useeffect
- Abort fetch requests on unmountmem-abort-fetch-requests
- Avoid closure-based memory leaksmem-avoid-closure-leaks
- Release heavy resources when not neededmem-release-heavy-resources
- Profile memory usage with development toolsmem-profile-with-tools
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
- Example rules: launch-splash-screen-control, list-use-flashlist
Full Compiled Document
For the complete guide with all rules expanded:
AGENTS.md