Skip to content

fix: update components for react-native-reanimated 4 compatibility#52

Open
haswalt wants to merge 1 commit intocodeherence:mainfrom
BarnDoorEvents:claude/update-react-native-compatibility-LbKFd
Open

fix: update components for react-native-reanimated 4 compatibility#52
haswalt wants to merge 1 commit intocodeherence:mainfrom
BarnDoorEvents:claude/update-react-native-compatibility-LbKFd

Conversation

@haswalt
Copy link

@haswalt haswalt commented Feb 26, 2026

  • FadingView: pass useAnimatedProps result directly instead of spreading, which broke Reanimated 4's internal animated proxy tracking
  • ScrollView: use Animated.ScrollView from reanimated instead of createAnimatedComponent(ScrollView) for proper Reanimated 4 support
  • Header/LargeHeader: convert View to Animated.View to support animated styles passed by consumers, preventing the "animated style to non-animated component" error in Reanimated 4

Description

Adds support for react-native-reanimated@^4.2.1 by correctly using animated views for header wrappers.

Motivation and Context

This library uses standard react-native views to wrap headers. These are animated and with the stricter worklets causes a crash: #50

How Has This Been Tested?

Existing tests and tested in a production app.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have followed the guidelines in the README.md file.
  • I have updated the documentation as necessary.
  • My changes generate no new warnings.

Additional Notes (Optional)

This update was done with the aid of AI but changes have been verified by a human engineer.

- FadingView: pass useAnimatedProps result directly instead of spreading,
  which broke Reanimated 4's internal animated proxy tracking
- ScrollView: use Animated.ScrollView from reanimated instead of
  createAnimatedComponent(ScrollView) for proper Reanimated 4 support
- Header/LargeHeader: convert View to Animated.View to support animated
  styles passed by consumers, preventing the "animated style to
  non-animated component" error in Reanimated 4

https://claude.ai/code/session_01K8dw23CbhakgyCBmuwr5jP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants