Skip to content

Update version of react-native-reanimated to 2.4.0 #1821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Feb 6, 2022

Conversation

yedidyak
Copy link
Contributor

@yedidyak yedidyak commented Feb 6, 2022

Description

Update version of react-native-reanimated (2.4.0)

Changelog

Update internally versions of react-native-reanimated and react-native-gesture-handler

@yedidyak yedidyak requested a review from ethanshar February 6, 2022 08:02
@M-i-k-e-l
Copy link
Collaborator

M-i-k-e-l commented Feb 6, 2022

For future reference a few workarounds were aded:

  1. onMomentumScrollEnd={() => {}} workaround for useAnimatedScrollHandler.onMomentumEnd not being called (Android) ([Android] onMomentumBegin/ -End not being called in Animated.ScrollView software-mansion/react-native-reanimated#2735)
  2. moduleNameMapper in package.json see this: Jest not resolving the module software-mansion/react-native-reanimated#1196
  3. interpolateColor mock see this missing interpolateColors mock software-mansion/react-native-reanimated#2749 (actually I think this is not a correct fix, so I'll open a new bug)

Copy link
Contributor

@lidord-wix lidord-wix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@M-i-k-e-l
I wrote small comment

@@ -103,6 +101,7 @@ function PageCarousel({...props}) {
scrollEventThrottle={16}
contentOffset={initialOffset} // iOS only
onLayout={scrollToInitial} // Android only
onMomentumScrollEnd={() => {}} // workaround for useAnimatedScrollHandler.onMomentumEnd not being called (https://github.com/software-mansion/react-native-reanimated/issues/2735)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll override the onMomentumScrollEnd prop that the user might send, no?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is VERY strange, if the user sends onMomentumScrollEnd the workaround stops working (even though this is overriding it).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by adding useCallback

@M-i-k-e-l M-i-k-e-l requested a review from lidord-wix February 6, 2022 12:42
@M-i-k-e-l M-i-k-e-l requested a review from lidord-wix February 6, 2022 13:31
@M-i-k-e-l M-i-k-e-l merged commit 1a8a07a into master Feb 6, 2022
M-i-k-e-l added a commit that referenced this pull request Feb 6, 2022
* Update versions of react-native-reanimated and react-native-gesture-handler

* Update reanimated to 2.3.1

* Fix exposed issue with interpolateColors can't handle undefined values

* Bumped reanimated to 2.4.0

* Fix TabController on Android

Swipe the carousel, label does not change color.

* Fix tests (workarounds)

* Remove expect errors

* Change function name

See https://github.com/software-mansion/react-native-reanimated/pull/2792/files

* Remove setup which seems to be no longer needed

* Revert to old function (for users who use older versions of reanimated)

* Change to noop

* Allow overriding onMomentumScrollEnd

* Fix types

Co-authored-by: Ethan Sharabi <[email protected]>
Co-authored-by: Miki Leib <[email protected]>
(cherry picked from commit 1a8a07a)
@M-i-k-e-l M-i-k-e-l deleted the infra/updateReanimatedAndGestureHandler_2.4 branch February 7, 2022 08:06
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.

4 participants