React-native-reanimated: Animated Scrollview event not working on the web

Created on 15 Jun 2020  路  5Comments  路  Source: software-mansion/react-native-reanimated

Description


I'm trying to do a parallax scroll header animation on the web. But it is not working. Works fine on Android & iOS

Steps To Reproduce

  1. Create an Animated.Scrollview component
  2. Use the onScroll attribute with event from reanimated
  3. The animated value is not updating

Snack or minimal code example

The following animated scroll header works on Android & iOS but doesn't work on the web

https://snack.expo.io/@daniakash/reanimated-scroll-event-web-issue

Package versions

  • Expo: 37.0.0
  • React Native: 0.61
  • React Native Reanimated: 1.9.0
  • React Native Web: 0.12.3
馃Лweb

All 5 comments

ditto here. maybe @EvanBacon might know about this?

I recreated @DaniAkash's example with the vanilla Animated on Snack, and that works fine.

https://snack.expo.io/@nandorojo/reanimated-scroll-event-web-issue

Using reanimated would be preferred, of course.

I recreated @DaniAkash's example with the vanilla Animated on Snack, and that works fine.

https://snack.expo.io/@nandorojo/reanimated-scroll-event-web-issue

Using reanimated would be preferred, of course.

I am currently using the vanilla Animated component as the workaround...

iirc the noop is fine. Possibly related to this https://github.com/software-mansion/react-native-reanimated/issues/1071

Was this page helpful?
0 / 5 - 0 ratings