React Native Expert
Senior mobile engineer building production-ready cross-platform applications with React Native and Expo.
When to Use
- Building a new React Native or Expo mobile app from scratch
- Setting up navigation (tabs, stacks, drawers, deep linking)
- Integrating native modules or platform-specific code
- Optimizing list performance (FlatList, SectionList)
- Handling SafeArea, keyboard avoidance, or platform differences
- Debugging Metro bundler, Xcode, or Gradle build issues
- Configuring Expo SDK projects
Don't use when: Building web-only apps, native Swift/Objective-C iOS apps, or native Kotlin/Java Android apps — use the appropriate platform-specific skills instead.
Core Workflow
- Setup — Scaffold with Expo, configure TypeScript → run
npx expo doctor to verify environment and SDK compatibility; fix any reported issues before proceeding
- Structure — Organize by feature, set up routing (Expo Router or React Navigation)
- Implement — Build components with platform handling → verify on iOS simulator and Android emulator; check Metro bundler output for errors before moving on
- Optimize — Optimize lists, images, memory → profile with Flipper or React DevTools
- Test — Test on both platforms, prioritize real devices over simulators
Error Recovery
- Metro bundler errors → Clear cache with
npx expo start --clear, then restart
- iOS build fails → Check Xcode logs → resolve native dependency or provisioning issue → rebuild with
npx expo run:ios
- Android build fails → Check
adb logcat or Gradle output → resolve SDK/NDK version mismatch → rebuild with npx expo run:android
- Native module not found → Run
npx expo install <module> to ensure compatible version, then rebuild native layers
Key Patterns
Optimized FlatList with memo + useCallback
import React, { memo, useCallback } from 'react';
import { FlatList, View, Text, StyleSheet } from 'react-native';
type Item = { id: string; title: string };
const ListItem = memo(({ title, onPress }: { title: string; onPress: () => void }) => (
<View style={styles.item}>
<Text
</View>
));
const keyExtractor = (item: Item) => item.id;
export function ItemList({ data }: { data: Item[] }) {
const renderItem = useCallback(
({ item }: { item: Item }) => (
<ListItem title={item.title} => console.log(item.id)} />
),
[]
);
return (
<FlatList
data={data}
renderItem={renderItem}
keyExtractor={keyExtractor}
removeClippedSubviews
maxToRenderPerBatch={10}
/>
);
}
const styles = StyleSheet.create({
item: { padding: 16, borderBottomWidth: 1, borderBottomColor: '#eee' },
});
SafeAreaView + Keyboard Avoidance
import React from 'react';
import { SafeAreaView, KeyboardAvoidingView, Platform, TextInput, StyleSheet } from 'react-native';
export function SafeForm() {
return (
<SafeAreaView style={styles.container}>
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
style={styles.inner}
>
<TextInput placeholder="Enter text" style={styles.input} />
</KeyboardAvoidingView>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: { flex: 1, backgroundColor: '#fff' },
inner: { padding: 16 },
input: { borderWidth: 1, borderColor: '#ccc', borderRadius: 8, padding: 12 },
});
Platform-Specific Code
import { Platform, StyleSheet } from 'react-native';
const styles = StyleSheet.create({
container: {
...Platform.select({
ios: { shadowColor: '#000', shadowOpacity: 0.25, shadowRadius: 4 },
android: { elevation: 4 },
default: {},
}),
},
});
Constraints
MUST DO
- Use FlatList/SectionList for scrollable lists (never ScrollView for large data)
- Implement
memo + useCallback for list items to prevent unnecessary re-renders
- Wrap top-level content in
SafeAreaView for device notches and safe areas
- Use
KeyboardAvoidingView for forms and text input screens
- Handle Android back button behavior in navigation stacks
- Test on both iOS and Android — platform differences are common
- Use
npx expo install (not npm install) for native modules to ensure SDK compatibility
MUST NOT DO
- Use ScrollView for large or dynamic lists (causes memory and performance issues)
- Use inline styles extensively (creates new style objects every render)
- Hardcode dimensions (use flex, Dimensions API, or responsive helpers)
- Ignore memory leaks from event listeners and subscriptions
- Skip platform-specific testing — behavior differs between iOS and Android
- Use
waitFor/setTimeout for animations (use react-native-reanimated instead)
- Render heavy lists without
removeClippedSubviews or maxToRenderPerBatch
Project Setup Checklist
Performance Optimization
| Issue |
Solution |
| Janky scrolling |
Use FlatList with removeClippedSubviews, maxToRenderPerBatch |
| Slow re-renders |
Wrap components with memo, use useCallback for handlers |
| Image loading delays |
Use react-native-fast-image, implement caching |
| Navigation lag |
Lazy-load screens, defer heavy computations |
| Memory leaks |
Clean up subscriptions in cleanup functions, use useEffect return |
| Large bundle size |
Use @expo/config-plugins, tree-shake unused dependencies |
Cross-Team Integration
Related Skills: react-expert, flutter-expert, test-driven-development, systematic-debugging, mobile-code-impact-assessment
Used By: Any agent building mobile features, especially frontend engineers in DevForge AI or dedicated mobile engineering teams.
1---2name: react-native-expert3description: >4 Use when building, optimizing, or debugging cross-platform mobile applications with5 React Native and Expo. Provides guidance for navigation setup, native module integration,6 performance optimization, and platform-specific handling for iOS and Android.7metadata:8 source: https://skillmd.com/skills/construct-ai-primary/react-native-expert9---1011# React Native Expert1213Senior mobile engineer building production-ready cross-platform applications with React Native and Expo.1415## When to Use1617- Building a new React Native or Expo mobile app from scratch18- Setting up navigation (tabs, stacks, drawers, deep linking)19- Integrating native modules or platform-specific code20- Optimizing list performance (FlatList, SectionList)21- Handling SafeArea, keyboard avoidance, or platform differences22- Debugging Metro bundler, Xcode, or Gradle build issues23- Configuring Expo SDK projects2425**Don't use when:** Building web-only apps, native Swift/Objective-C iOS apps, or native Kotlin/Java Android apps — use the appropriate platform-specific skills instead.2627## Core Workflow28291. **Setup** — Scaffold with Expo, configure TypeScript → run `npx expo doctor` to verify environment and SDK compatibility; fix any reported issues before proceeding302. **Structure** — Organize by feature, set up routing (Expo Router or React Navigation)313. **Implement** — Build components with platform handling → verify on iOS simulator and Android emulator; check Metro bundler output for errors before moving on324. **Optimize** — Optimize lists, images, memory → profile with Flipper or React DevTools335. **Test** — Test on both platforms, prioritize real devices over simulators3435### Error Recovery3637- **Metro bundler errors** → Clear cache with `npx expo start --clear`, then restart38- **iOS build fails** → Check Xcode logs → resolve native dependency or provisioning issue → rebuild with `npx expo run:ios`39- **Android build fails** → Check `adb logcat` or Gradle output → resolve SDK/NDK version mismatch → rebuild with `npx expo run:android`40- **Native module not found** → Run `npx expo install <module>` to ensure compatible version, then rebuild native layers4142## Key Patterns4344### Optimized FlatList with memo + useCallback4546```tsx47import React, { memo, useCallback } from 'react';48import { FlatList, View, Text, StyleSheet } from 'react-native';4950type Item = { id: string; title: string };5152const ListItem = memo(({ title, onPress }: { title: string; onPress: () => void }) => (53 <View style={styles.item}>54 <Text onPress={onPress}>{title}</Text>55 </View>56));5758const keyExtractor = (item: Item) => item.id;5960export function ItemList({ data }: { data: Item[] }) {61 const renderItem = useCallback(62 ({ item }: { item: Item }) => (63 <ListItem title={item.title} onPress={() => console.log(item.id)} />64 ),65 []66 );6768 return (69 <FlatList70 data={data}71 renderItem={renderItem}72 keyExtractor={keyExtractor}73 removeClippedSubviews74 maxToRenderPerBatch={10}75 />76 );77}7879const styles = StyleSheet.create({80 item: { padding: 16, borderBottomWidth: 1, borderBottomColor: '#eee' },81});82```8384### SafeAreaView + Keyboard Avoidance8586```tsx87import React from 'react';88import { SafeAreaView, KeyboardAvoidingView, Platform, TextInput, StyleSheet } from 'react-native';8990export function SafeForm() {91 return (92 <SafeAreaView style={styles.container}>93 <KeyboardAvoidingView94 behavior={Platform.OS === 'ios' ? 'padding' : 'height'}95 style={styles.inner}96 >97 <TextInput placeholder="Enter text" style={styles.input} />98 </KeyboardAvoidingView>99 </SafeAreaView>100 );101}102103const styles = StyleSheet.create({104 container: { flex: 1, backgroundColor: '#fff' },105 inner: { padding: 16 },106 input: { borderWidth: 1, borderColor: '#ccc', borderRadius: 8, padding: 12 },107});108```109110### Platform-Specific Code111112```tsx113import { Platform, StyleSheet } from 'react-native';114115const styles = StyleSheet.create({116 container: {117 ...Platform.select({118 ios: { shadowColor: '#000', shadowOpacity: 0.25, shadowRadius: 4 },119 android: { elevation: 4 },120 default: {},121 }),122 },123});124```125126## Constraints127128### MUST DO129130- Use FlatList/SectionList for scrollable lists (never ScrollView for large data)131- Implement `memo` + `useCallback` for list items to prevent unnecessary re-renders132- Wrap top-level content in `SafeAreaView` for device notches and safe areas133- Use `KeyboardAvoidingView` for forms and text input screens134- Handle Android back button behavior in navigation stacks135- Test on both iOS and Android — platform differences are common136- Use `npx expo install` (not `npm install`) for native modules to ensure SDK compatibility137138### MUST NOT DO139140- Use ScrollView for large or dynamic lists (causes memory and performance issues)141- Use inline styles extensively (creates new style objects every render)142- Hardcode dimensions (use flex, Dimensions API, or responsive helpers)143- Ignore memory leaks from event listeners and subscriptions144- Skip platform-specific testing — behavior differs between iOS and Android145- Use `waitFor`/`setTimeout` for animations (use `react-native-reanimated` instead)146- Render heavy lists without `removeClippedSubviews` or `maxToRenderPerBatch`147148## Project Setup Checklist149150- [ ] Expo SDK version matches across `package.json` and native binaries151- [ ] `npx expo doctor` passes with no issues152- [ ] TypeScript configured with strict mode153- [ ] Navigation library chosen (Expo Router recommended for file-based routing)154- [ ] Platform-specific folders (`ios/`, `android/`) exist and build successfully155- [ ] ESLint + Prettier configured for `.tsx`/`.ts` files156- [ ] Metro config customized if needed (asset extensions, resolver config)157158## Performance Optimization159160| Issue | Solution |161|-------|----------|162| Janky scrolling | Use `FlatList` with `removeClippedSubviews`, `maxToRenderPerBatch` |163| Slow re-renders | Wrap components with `memo`, use `useCallback` for handlers |164| Image loading delays | Use `react-native-fast-image`, implement caching |165| Navigation lag | Lazy-load screens, defer heavy computations |166| Memory leaks | Clean up subscriptions in cleanup functions, use `useEffect` return |167| Large bundle size | Use `@expo/config-plugins`, tree-shake unused dependencies |168169## Cross-Team Integration170171**Related Skills:** `react-expert`, `flutter-expert`, `test-driven-development`, `systematic-debugging`, `mobile-code-impact-assessment`172173**Used By:** Any agent building mobile features, especially frontend engineers in DevForge AI or dedicated mobile engineering teams.