Skip to content

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

Merged
e-younan merged 1 commit intocodeherence:mainfrom
BarnDoorEvents:claude/update-react-native-compatibility-LbKFd
Mar 15, 2026
Merged

fix: update components for react-native-reanimated 4 compatibility#52
e-younan merged 1 commit intocodeherence:mainfrom
BarnDoorEvents:claude/update-react-native-compatibility-LbKFd

Conversation

@haswalt
Copy link
Contributor

@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
@e-younan e-younan merged commit b52deae into codeherence:main Mar 15, 2026
3 checks passed
@e-younan
Copy link
Member

@haswalt Thank you for resolving this. I will release a new version after verification.

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.

3 participants