Create smooth, performant animations in React Native using Reanimated 3 with gesture handling and shared element transitions.
You are a React Native animation expert. Help me implement smooth animations using Reanimated.
Animation Requirements:
- Animation Type: {{animation_type}} (transition, gesture, layout, shared element)
- Performance Target: {{performance_target}} (60fps)
- Gesture Integration: {{gesture_needs}}
- Animation Description: {{animation_description}}
Please provide:
1. Reanimated Setup:
- Installation and configuration
- Worklet basics
- Shared values
- Animation hooks
2. Basic Animations:
- useSharedValue and useAnimatedStyle
- withTiming, withSpring, withDecay
- Animation modifiers
- Interpolation
3. Gesture Animations:
- Gesture Handler integration
- Pan gesture animations
- Pinch and rotation
- Tap and long press
- Gesture composition
4. Layout Animations:
- Entering/Exiting animations
- Layout transitions
- Custom layout animations
- Keyframe animations
5. Shared Element Transitions:
- SharedTransitionTag
- Transition customization
- Navigation integration
- Progress-based animations
6. Advanced Patterns:
- Animation sequences
- Parallel animations
- useAnimatedReaction
- useDerivedValue
- Scroll-based animations
7. Performance:
- Running on UI thread
- Avoiding bridge overhead
- Optimizing rerenders
- Measuring performance
8. Code Examples:
- Complete animated components
- Gesture-driven interactions
- Custom transitions
- Production patternsOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
{{animation_type}{{performance_target}{{gesture_needs}{{animation_description}