Performance
Animation Smoothness on Low-End Devices
Complex animations with many interpolations may not run at consistent 60fps on older devices. Solution: Test on actual low-end devices, simplify animations, or use conditional logic:Shader Compilation
Complex transforms compile shaders on first run, causing a brief stutter. Solution: Profile early, test on target devices, keep transforms simple:Memory Usage with Bounds Tracking
Tracking many shared elements increases memory footprint. Solution: Use only necessary shared elements, clean up unused bounds:Gesture Interaction
Simultaneous Gesture Conflicts
When ScrollView and navigator gestures respond to the same input, behavior may be unpredictable. Solution: UsesheetScrollGestureBehavior to define boundaries:
Gesture Ownership Shadowing
A child navigator’s gesture claims the same axis as a parent, preventing parent interaction. Solution: Use different gesture directions or disable child gesture:Velocity Overshoot
High release velocity may cause animations to overshoot snap points. Solution: Cap velocity or reduce velocity impact:Shared Elements
Bounds Measurement Delays
Shared element bounds may not be immediately available when animation starts. Ensure shared element boundaries are mounted and visible before triggering navigation to guarantee measurement timing.Shape Mismatch Between Source and Destination
If source and destination have different aspect ratios, animation may look stretched. Solution: Ensure consistent dimensions or use letterboxing:Unmounted Boundary Components
If a shared element boundary unmounts before animation completes, bounds become stale. Solution: Keep boundary elements mounted during transitions:Layout and Measurement
Dynamic Content Height
Content height may change during animation (e.g., images loading), affecting snap points. Solution: Pre-measure or use fixed heights:Safe Area Insets Not Applied
Content may overflow into notches or safe areas. Solution: Manually apply safe area insets:Navigation
Back Button Behavior
Android back button behavior may differ from iOS swipe gesture. Solution: Test both platforms, provide visual back affordance:Deep Link Navigation
Deep links may not trigger animations if navigators aren’t set up for it. Solution: Ensure navigators are initialized before deep linking:Platform-Specific Issues
iOS vs Android Differences
Gesture and animation behavior differs slightly:| Aspect | iOS | Android |
|---|---|---|
| Swipe gesture | Smooth, precise | May feel less responsive |
| Bounce/overshoot | Natural bounce | Requires config |
| Header animations | Smooth | May stutter |
| Safe area | Auto-handled | Manual insets needed |
Notch/Safe Area
Notched devices need explicit handling. Solution: Usereact-native-safe-area-context:
Floating Action Button (FAB)
FAB may conflict with gesture detection or snap points. Solution: Position FAB outside gesture area or disable during animation:Experimental Features
experimental_animateOnInitialMount
This feature is experimental and may change or be removed. Status: Available in v3.4 but subject to API changes. Solution: Use with caution, test thoroughly:Compatibility
React Navigation Version
Requires React Navigation 6.0+. Earlier versions not supported. Check version:Reanimated Version
Requires Reanimated 3.0+. Version 2 not supported. Check version:Best Practices
- Profile early: Test animations on target devices
- Limit complexity: Simpler animations are more reliable
- Test both platforms: iOS and Android have different behaviors
- Use TypeScript: Catch type errors early
- Handle edge cases: Unmounting, interruptions, etc.
- Monitor performance: Use React DevTools Profiler
- Test low-end devices: Don’t assume powerful hardware
Getting Help
If you encounter issues:- Check troubleshooting sections in guides
- Review gesture ownership rules
- Test with simplified interpolator
- Check GitHub issues
- Read Reanimated docs
Summary
The library is powerful but has edge cases. Understanding these caveats helps you build robust, performant applications. When in doubt, simplify and test on real devices.Next Steps
- Review custom animations for optimization tips
- Learn gesture ownership to avoid conflicts
- See migration guide if upgrading from v3.3
