react-native-expert
React Native Expert - Setup, Build, Debug, Performance
Comprehensive React Native and Expo expertise covering environment setup, Metro bundler, native modules, device testing, performance optimization, and debugging.
Quick Setup Commands
Expo (Recommended)
# Create new project
npx create-expo-app@latest MyProject
cd MyProject
npx expo start
# Development build (custom native code)
npx expo install expo-dev-client
eas build --profile development --platform ios
React Native CLI
# Create project (New Architecture enabled by default)
npx @react-native-community/cli init MyProject
cd MyProject
# Install iOS deps with New Architecture
cd ios && RCT_NEW_ARCH_ENABLED=1 pod install && cd ..
# Run
npm run ios
npm run android
Environment Requirements (2025)
| Component | Minimum | Recommended |
|---|---|---|
| Node.js | 20.x | 22 LTS |
| React Native | 0.76+ | 0.83 |
| Expo SDK | 52+ | 54 |
| Xcode | 16.1 | 26 |
| Android SDK | 34 | 35 |
| CocoaPods | 1.14 | 1.15+ |
Common Build Issues
Metro Cache Issues
# Clear everything
watchman watch-del-all
npx react-native start --reset-cache
# Expo
npx expo start --clear
iOS Pod Issues
# Nuclear option
cd ios && rm -rf build Pods Podfile.lock && pod install && cd ..
Android Gradle Issues
cd android && ./gradlew clean && cd ..
Native Modules
Creating Turbo Module
// specs/NativeCalculator.ts
import type { TurboModule } from 'react-native';
import { TurboModuleRegistry } from 'react-native';
export interface Spec extends TurboModule {
add(a: number, b: number): number;
}
export default TurboModuleRegistry.getEnforcing<Spec>('NativeCalculator');
Linking Native Code
# Auto-linking (RN 0.60+)
cd ios && pod install
cd android && ./gradlew build
Performance Optimization
Enable Hermes
// android/app/build.gradle
hermesEnabled = true
// ios: Already default with New Architecture
Performance Monitoring
import { PerformanceObserver } from 'react-native-performance';
new PerformanceObserver((list) => {
list.getEntries().forEach(entry => {
console.log(`${entry.name}: ${entry.duration}ms`);
});
}).observe({ entryTypes: ['measure'] });
Image Optimization
// Use FastImage for better caching
import FastImage from 'react-native-fast-image';
<FastImage
source={{ uri: 'https://example.com/image.jpg' }}
resizeMode={FastImage.resizeMode.cover}
/>
Device Testing
iOS Simulator
# List devices
xcrun simctl list devices
# Boot specific device
xcrun simctl boot "iPhone 16 Pro"
# Run on device
npx react-native run-ios --device "My iPhone"
Android Emulator
# List AVDs
emulator -list-avds
# Run emulator
emulator -avd Pixel_8_API_35
# Run on device
npx react-native run-android --deviceId <device-id>
Debugging
Flipper (Deprecated)
# Use Chrome DevTools instead (RN 0.73+)
# Press 'j' in Metro to open debugger
React DevTools
npx react-devtools
Common Debug Patterns
// Native crash on iOS
// Check: Xcode → Device and Simulators → View Device Logs
// Bridge error
// Clear Metro cache and rebuild
watchman watch-del-all
npx react-native start --reset-cache
// Android build failure
cd android && ./gradlew clean && cd ..
Environment Variables
# ~/.zshrc or ~/.bash_profile
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin
# Reload
source ~/.zshrc
Health Check
node --version # 20+
xcodebuild -version # 16.1+
pod --version # 1.15+
adb --version
watchman version
eas --version # Expo
Related Skills
mobile-architect- Architecture decisions
More from anton-abyzov/specweave
technical-writing
Technical writing expert for API documentation, README files, tutorials, changelog management, and developer documentation. Covers style guides, information architecture, versioning docs, OpenAPI/Swagger, and documentation-as-code. Activates for technical writing, API docs, README, changelog, tutorial writing, documentation, technical communication, style guide, OpenAPI, Swagger, developer docs.
45spec-driven-brainstorming
Spec-driven brainstorming and product discovery expert. Helps teams ideate features, break down epics, conduct story mapping sessions, prioritize using MoSCoW/RICE/Kano, and validate ideas with lean startup methods. Activates for brainstorming, product discovery, story mapping, feature ideation, prioritization, MoSCoW, RICE, Kano model, lean startup, MVP definition, product backlog, feature breakdown.
43kafka-architecture
Apache Kafka architecture expert for cluster design, capacity planning, and high availability. Use when designing Kafka clusters, choosing partition strategies, or sizing brokers for production workloads.
34docusaurus
Docusaurus 3.x documentation framework - MDX authoring, theming, versioning, i18n. Use for documentation sites or spec-weave.com.
29frontend
Expert frontend developer for React, Vue, Angular, and modern JavaScript/TypeScript. Use when creating components, implementing hooks, handling state management, or building responsive web interfaces. Covers React 18+ features, custom hooks, form handling, and accessibility best practices.
29reflect
Self-improving AI memory system that persists learnings across sessions in CLAUDE.md. Use when capturing corrections, remembering user preferences, or extracting patterns from successful implementations. Enables continual learning without starting from zero each conversation.
27