react-native-expert
React Native Expert Skill
React Native patterns: mobile optimization, navigation, platform handling.
1. Project Structure
src/
├── components/{ui,common}/ # Shared + business components
├── screens/ # Screen components
├── navigation/ # Nav config
├── hooks/ services/ stores/ utils/ constants/ types/ assets/
2. Components
Detect styling approach from package.json: NativeWind, StyleSheet, Emotion.
Use Pressable over TouchableOpacity. Memoize list items. Use useCallback for handlers.
const ListItem = React.memo(function ListItem({ item, onPress }: Props) {
const handlePress = useCallback(() => onPress(item.id), [item.id, onPress]);
return <Pressable onPress={handlePress}><Text>{item.title}</Text></Pressable>;
});
3. FlatList Optimization
<FlatList
data={items}
renderItem={renderItem} // useCallback
keyExtractor={keyExtractor} // useCallback: item => item.id
removeClippedSubviews
maxToRenderPerBatch={10}
windowSize={5}
getItemLayout={getItemLayout} // if fixed height
/>
FlashList (@shopify/flash-list) is better for large lists -- needs only estimatedItemSize.
4. Navigation (React Navigation)
Type-safe: Define RootStackParamList, use NativeStackScreenProps and typed useNavigation<NavigationProp>().
Deep linking: Configure linking.config.screens with URL patterns.
5. Platform-Specific
Platform.select({ ios: {...}, android: {...} })for style differences- Platform-specific files:
Button.ios.tsx/Button.android.tsx SafeAreaViewwith edges, oruseSafeAreaInsets()for custom handling
6. Images
Use FastImage for network images (priority, caching, preload). require() for local images.
7. Animations (Reanimated)
useSharedValue + useAnimatedStyle + withSpring/withTiming. Gesture Handler: Gesture.Pan() with onUpdate/onEnd.
8. Storage
- AsyncStorage: Non-sensitive data (settings)
- SecureStore: Sensitive data (tokens)
- MMKV: Performance-critical storage
9. Testing
@testing-library/react-native: render, fireEvent.press, waitFor.
Quick Reference
checklist[12]{area,best_practice}:
Lists,Use FlashList or optimized FlatList
Images,Use FastImage for network images
Navigation,Type-safe with RootStackParamList
Styling,Detect project approach (NativeWind/StyleSheet)
Platform,Use Platform.select for differences
Safe area,Use SafeAreaView or useSafeAreaInsets
Animations,Use Reanimated for 60fps
Gestures,Use Gesture Handler
Storage,SecureStore for tokens AsyncStorage for prefs
Performance,Memoize components and callbacks
Testing,React Native Testing Library
Pressable,Use over TouchableOpacity
More from nguyenthienthanh/aura-frog
stitch-design
Generate UI designs using Google Stitch AI with optimized prompts
37angular-expert
Angular 17+ gotchas and decision criteria. Covers signals vs observables, standalone patterns, and common pitfalls Claude gets wrong.
31flutter-expert
Flutter/Dart mobile expert. PROACTIVELY use when working with Flutter, Dart, mobile apps. Triggers: flutter, dart, widget, bloc, riverpod
16dev-expert
Development patterns for React, Vue, Laravel, Next.js, React Native - state management, forms, API integration
13visual-pixel-perfect
Pixel-perfect visual testing with auto-fix loop. Implement → Render → Snapshot → Compare → Fix until pass.
13seo-expert
SEO and search engine optimization expert. PROACTIVELY use when working with meta tags, structured data, Core Web Vitals, sitemap, robots.txt, canonical URLs. Triggers: SEO, meta tags, schema markup, search ranking
13