Skip to main content

Overview

Performance directly impacts user experience. This guide covers techniques to make your Expo app fast and responsive.

Measuring Performance

React DevTools Profiler

Install React DevTools:
Add script:
package.json
Run:

Performance monitoring hook

hooks/usePerformanceMonitor.ts
Usage:

Optimizing Renders

React.memo

Prevent unnecessary re-renders:
components/UserCard.tsx

useMemo

Memoize expensive calculations:

useCallback

Memoize function references:

List Performance

FlatList optimization

components/OptimizedList.tsx

FlashList (faster alternative)

FlashList can be 10x faster than FlatList for large lists with consistent item sizes.

Image Optimization

expo-image

Use the optimized Image component:

Progressive image loading

components/ProgressiveImage.tsx

Image sizing

Animations

react-native-reanimated

Use for smooth, performant animations:
components/AnimatedBox.tsx

Avoid setState in animations

JavaScript Performance

Avoid inline objects and functions

Debounce and throttle

hooks/useDebounce.ts
Usage:

Web Workers (Expo)

Offload heavy computations:
utils/worker.ts

Memory Management

Clean up subscriptions

Cancel pending requests

hooks/useFetch.ts

Avoid memory leaks

Network Optimization

Request deduplication

utils/cache.ts

Pagination

hooks/usePagination.ts

Profiling Tools

Expo Performance Monitor

Custom performance logger

utils/performance.ts
Usage:

Platform-Specific Optimization

Enable Hermes

Hermes is enabled by default on iOS. Verify in app.json:

Reduce app size

app.json

Troubleshooting

  • Reduce bundle size (see Bundle Size guide)
  • Lazy load screens with dynamic imports
  • Optimize splash screen assets
  • Enable Hermes engine
  • Use useNativeDriver: true for Animated
  • Switch to react-native-reanimated
  • Avoid setState during animations
  • Check for expensive renders during animation
  • Use FlashList instead of FlatList
  • Memoize list items with React.memo
  • Implement getItemLayout for fixed-size items
  • Reduce complexity of list item components
  • Check for memory leaks (unmounted setState)
  • Clean up subscriptions in useEffect
  • Cancel pending network requests
  • Optimize image sizes and caching

Performance Checklist

  • Enable Hermes engine
  • Use React.memo for expensive components
  • Implement useMemo for expensive calculations
  • Use useCallback for stable function references
  • Optimize FlatList with proper props
  • Use expo-image instead of Image
  • Enable useNativeDriver for animations
  • Debounce user input handlers
  • Clean up useEffect subscriptions
  • Cancel pending requests on unmount
  • Lazy load routes and components
  • Profile with React DevTools
  • Monitor bundle size
  • Optimize images before upload