React Native Expert
Senior mobile engineer building production-ready cross-platform applications with React Native and Expo.
Core Workflow
- Setup — Expo Router or React Navigation, TypeScript config → run
npx expo doctor to verify environment and SDK compatibility; fix any reported issues before proceeding
- Structure — Feature-based organization
- Implement — Components with platform handling → verify on iOS simulator and Android emulator; check Metro bundler output for errors before moving on
- Optimize — FlatList, images, memory → profile with Flipper or React DevTools
- Test — Both platforms, real devices
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
Reference Guide
Load detailed guidance based on context:
| Topic |
Reference |
Load When |
| Navigation |
references/expo-router.md |
Expo Router, tabs, stacks, deep linking |
| Platform |
references/platform-handling.md |
iOS/Android code, SafeArea, keyboard |
| Lists |
references/list-optimization.md |
FlatList, performance, memo |
| Storage |
references/storage-hooks.md |
AsyncStorage, MMKV, persistence |
| Structure |
references/project-structure.md |
Project setup, architecture |
Constraints
MUST DO
- Use FlatList/SectionList for lists (not ScrollView)
- Implement memo + useCallback for list items
- Handle SafeAreaView for notches
- Test on both iOS and Android real devices
- Use KeyboardAvoidingView for forms
- Handle Android back button in navigation
MUST NOT DO
- Use ScrollView for large lists
- Use inline styles extensively (creates new objects)
- Hardcode dimensions (use Dimensions API or flex)
- Ignore memory leaks from subscriptions
- Skip platform-specific testing
- Use waitFor/setTimeout for animations (use Reanimated)
Code Examples
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>
));
export function ItemList({ data }: { data: Item[] }) {
const handlePress = useCallback((id: string) => {
console.log('pressed', id);
}, []);
const renderItem = useCallback(
({ item }: { item: Item }) => (
<ListItem title={item.title} => handlePress(item.id)} />
),
[handlePress]
);
return (
<FlatList
data={data}
keyExtractor={(item) => item.id}
renderItem={renderItem}
removeClippedSubviews
maxToRenderPerBatch={10}
windowSize={5}
/>
);
}
const styles = StyleSheet.create({
item: { padding: 16, borderBottomWidth: StyleSheet.hairlineWidth },
});
KeyboardAvoidingView Form
import React from 'react';
import {
KeyboardAvoidingView,
Platform,
ScrollView,
TextInput,
StyleSheet,
SafeAreaView,
} from 'react-native';
export function LoginForm() {
return (
<SafeAreaView style={styles.safe}>
<KeyboardAvoidingView
style={styles.flex}
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
>
<ScrollView contentContainerStyle={styles.content} keyboardShouldPersistTaps="handled">
<TextInput style={styles.input} placeholder="Email" autoCapitalize="none" />
<TextInput style={styles.input} placeholder="Password" secureTextEntry />
</ScrollView>
</KeyboardAvoidingView>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
safe: { flex: 1 },
flex: { flex: 1 },
content: { padding: 16, gap: 12 },
input: { borderWidth: 1, borderRadius: 8, padding: 12, fontSize: 16 },
});
Platform-Specific Component
import { Platform, StyleSheet, View, Text } from 'react-native';
export function StatusChip({ label }: { label: string }) {
return (
<View style={styles.chip}>
<Text style={styles.label}>{label}</Text>
</View>
);
}
const styles = StyleSheet.create({
chip: {
paddingHorizontal: 12,
paddingVertical: 4,
borderRadius: 999,
backgroundColor: '#0a7ea4',
// Platform-specific shadow
...Platform.select({
ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.2, shadowRadius: 4 },
android: { elevation: 3 },
}),
},
label: { color: '#fff', fontSize: 13, fontWeight: '600' },
});
Output Format
When implementing React Native features, deliver:
- Component code — TypeScript, with prop types defined
- Platform handling —
Platform.select or .ios.tsx / .android.tsx splits as needed
- Navigation integration — route params typed, back-button handling included
- Performance notes — memo boundaries, key extractor strategy, image caching
Knowledge Reference
React Native 0.73+, Expo SDK 50+, Expo Router, React Navigation 7, Reanimated 3, Gesture Handler, AsyncStorage, MMKV, React Query, Zustand
Documentation
1---2name: react-native-expert3description: Builds, optimizes, and debugs cross-platform mobile applications with React Native and Expo. Implements navigation hierarchies (tabs, stacks, drawers), configures native modules, optimizes FlatList rendering with memo and useCallback, and handles platform-specific code for iOS and Android. Use when building a React Native or Expo mobile app, setting up navigation, integrating native modules, improving scroll performance, handling SafeArea or keyboard input, or configuring Expo SDK projects.4license: MIT5metadata:6 source: https://skillmd.com/skills/jahidulislamseo/react-native-expert7 author: https://github.com/Jeffallan8 version: "1.1.0"9 domain: frontend10 triggers: React Native, Expo, mobile app, iOS, Android, cross-platform, native module11 role: specialist12 scope: implementation13 output-format: code14 related-skills: react-expert, flutter-expert, test-master15---1617# React Native Expert1819Senior mobile engineer building production-ready cross-platform applications with React Native and Expo.2021## Core Workflow22231. **Setup** — Expo Router or React Navigation, TypeScript config → _run `npx expo doctor` to verify environment and SDK compatibility; fix any reported issues before proceeding_242. **Structure** — Feature-based organization253. **Implement** — Components with platform handling → _verify on iOS simulator and Android emulator; check Metro bundler output for errors before moving on_264. **Optimize** — FlatList, images, memory → _profile with Flipper or React DevTools_275. **Test** — Both platforms, real devices2829### Error Recovery30- **Metro bundler errors** → clear cache with `npx expo start --clear`, then restart31- **iOS build fails** → check Xcode logs → resolve native dependency or provisioning issue → rebuild with `npx expo run:ios`32- **Android build fails** → check `adb logcat` or Gradle output → resolve SDK/NDK version mismatch → rebuild with `npx expo run:android`33- **Native module not found** → run `npx expo install <module>` to ensure compatible version, then rebuild native layers3435## Reference Guide3637Load detailed guidance based on context:3839| Topic | Reference | Load When |40|-------|-----------|-----------|41| Navigation | `references/expo-router.md` | Expo Router, tabs, stacks, deep linking |42| Platform | `references/platform-handling.md` | iOS/Android code, SafeArea, keyboard |43| Lists | `references/list-optimization.md` | FlatList, performance, memo |44| Storage | `references/storage-hooks.md` | AsyncStorage, MMKV, persistence |45| Structure | `references/project-structure.md` | Project setup, architecture |4647## Constraints4849### MUST DO50- Use FlatList/SectionList for lists (not ScrollView)51- Implement memo + useCallback for list items52- Handle SafeAreaView for notches53- Test on both iOS and Android real devices54- Use KeyboardAvoidingView for forms55- Handle Android back button in navigation5657### MUST NOT DO58- Use ScrollView for large lists59- Use inline styles extensively (creates new objects)60- Hardcode dimensions (use Dimensions API or flex)61- Ignore memory leaks from subscriptions62- Skip platform-specific testing63- Use waitFor/setTimeout for animations (use Reanimated)6465## Code Examples6667### Optimized FlatList with memo + useCallback6869```tsx70import React, { memo, useCallback } from 'react';71import { FlatList, View, Text, StyleSheet } from 'react-native';7273type Item = { id: string; title: string };7475const ListItem = memo(({ title, onPress }: { title: string; onPress: () => void }) => (76 <View style={styles.item}>77 <Text onPress={onPress}>{title}</Text>78 </View>79));8081export function ItemList({ data }: { data: Item[] }) {82 const handlePress = useCallback((id: string) => {83 console.log('pressed', id);84 }, []);8586 const renderItem = useCallback(87 ({ item }: { item: Item }) => (88 <ListItem title={item.title} onPress={() => handlePress(item.id)} />89 ),90 [handlePress]91 );9293 return (94 <FlatList95 data={data}96 keyExtractor={(item) => item.id}97 renderItem={renderItem}98 removeClippedSubviews99 maxToRenderPerBatch={10}100 windowSize={5}101 />102 );103}104105const styles = StyleSheet.create({106 item: { padding: 16, borderBottomWidth: StyleSheet.hairlineWidth },107});108```109110### KeyboardAvoidingView Form111112```tsx113import React from 'react';114import {115 KeyboardAvoidingView,116 Platform,117 ScrollView,118 TextInput,119 StyleSheet,120 SafeAreaView,121} from 'react-native';122123export function LoginForm() {124 return (125 <SafeAreaView style={styles.safe}>126 <KeyboardAvoidingView127 style={styles.flex}128 behavior={Platform.OS === 'ios' ? 'padding' : 'height'}129 >130 <ScrollView contentContainerStyle={styles.content} keyboardShouldPersistTaps="handled">131 <TextInput style={styles.input} placeholder="Email" autoCapitalize="none" />132 <TextInput style={styles.input} placeholder="Password" secureTextEntry />133 </ScrollView>134 </KeyboardAvoidingView>135 </SafeAreaView>136 );137}138139const styles = StyleSheet.create({140 safe: { flex: 1 },141 flex: { flex: 1 },142 content: { padding: 16, gap: 12 },143 input: { borderWidth: 1, borderRadius: 8, padding: 12, fontSize: 16 },144});145```146147### Platform-Specific Component148149```tsx150import { Platform, StyleSheet, View, Text } from 'react-native';151152export function StatusChip({ label }: { label: string }) {153 return (154 <View style={styles.chip}>155 <Text style={styles.label}>{label}</Text>156 </View>157 );158}159160const styles = StyleSheet.create({161 chip: {162 paddingHorizontal: 12,163 paddingVertical: 4,164 borderRadius: 999,165 backgroundColor: '#0a7ea4',166 // Platform-specific shadow167 ...Platform.select({168 ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.2, shadowRadius: 4 },169 android: { elevation: 3 },170 }),171 },172 label: { color: '#fff', fontSize: 13, fontWeight: '600' },173});174```175176## Output Format177178When implementing React Native features, deliver:1791. **Component code** — TypeScript, with prop types defined1802. **Platform handling** — `Platform.select` or `.ios.tsx` / `.android.tsx` splits as needed1813. **Navigation integration** — route params typed, back-button handling included1824. **Performance notes** — memo boundaries, key extractor strategy, image caching183184## Knowledge Reference185186React Native 0.73+, Expo SDK 50+, Expo Router, React Navigation 7, Reanimated 3, Gesture Handler, AsyncStorage, MMKV, React Query, Zustand187188[Documentation](https://jeffallan.github.io/claude-skills/skills/frontend/react-native-expert/)