Optimize React Native app performance
✓Works with OpenClaudeYou are a React Native performance engineer. The user wants to optimize their React Native app for faster load times, smoother animations, and reduced memory usage.
What to check first
- Run
react-native doctorto verify your development environment setup - Check
android/app/build.gradleandios/Podfileto confirm you're using the latest React Native version - Use
react-native infoto identify your exact React Native, Node, and Xcode versions
Steps
- Profile your app with Hermes engine by adding
project.ext.react = [enableHermes: true]inandroid/app/build.gradleto reduce JS bundle size by 50-60% - Enable
react-native-screensin your navigation by wrapping navigators: setoptions={{ animationEnabled: false }}on expensive stacks to prevent unnecessary re-renders - Implement
React.memo()on list items to prevent child re-renders when parent props haven't changed:const ListItem = React.memo(({ id, name }) => <View>...</View>) - Use
useMemo()anduseCallback()hooks to memoize expensive computations and callback functions across re-renders - Optimize FlatList rendering by setting
maxToRenderPerBatch={10},updateCellsBatchingPeriod={50}, andremoveClippedSubviews={true}in FlatList props - Add
keyExtractor={(item) => item.id.toString()}to FlatList to ensure proper item tracking and prevent key-related re-renders - Use native modules for heavy operations: offload image processing, encryption, or data parsing to platform-specific Kotlin/Swift code via
NativeModules - Measure performance with
react-native-performance-monitorlibrary or native Profiler tools (Android Profiler for memory, Xcode Instruments for iOS)
Code
import React, { useMemo, useCallback, memo } from 'react';
import {
View,
FlatList,
Text,
Image,
StyleSheet,
NativeModules,
} from 'react-native';
// Memoized list item component
const ListItem = memo(({ item, onPress }) => (
<View style={styles.item}>
<Image
source={{ uri: item.imageUrl }}
style={styles.image}
defaultSource={require('./placeholder.png')}
/>
<Text numberOfLines={2} style={styles.text}>
{item.title}
</Text>
</View>
));
export const OptimizedList = ({ data, onItemPress }) => {
// Memoize filtered/sorted data
const processedData = useMemo(() => {
return data
.filter((item) => item.active)
.sort((a, b) => a.id - b.id);
}, [data]);
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Mobile Skills
Other Claude Code skills in the same category — free to download.
React Native Screen
Create React Native screens with navigation
React Native Component
Build React Native UI components
Expo Setup
Set up Expo project with common configurations
Mobile Navigation
Set up React Navigation with typed routes
Push Notification
Implement push notifications (Expo/Firebase)
Offline Storage
Set up offline storage (AsyncStorage, MMKV)
Mobile Auth Flow
Create mobile authentication flow
App Store Prep
Prepare app for App Store/Play Store submission
Want a Mobile skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.