question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supporting useNativeDriver in Animated.Event for onScroll events.

See original GitHub issue

I would like to use https://reactnative.dev/docs/animated#handling-gestures-and-other-events with recyclerlistview. Currently onScroll accepts only javascript events.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
punkstacommented, Feb 10, 2021

fixed by using Animated.createAnimatedComponent( RecyclerListView )

1reaction
punkstacommented, Feb 3, 2021

apparently it works 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Animated with useNativeDriver - Stack Overflow
Short answer: it isn't possible. You can use native driver only by passing Animated.event into onScroll handler.
Read more >
Animated.event() with useNativeDriver returns an object, not a ...
This is specially useful for animations that follow the scroll position as without the native driver, the animation will always run a frame ......
Read more >
Non-Native and Native Animated Values in React Native
The Solution. Simply use both the native and non-native variables! To do this, you must first listen for scroll events with the native...
Read more >
Using Native Driver for Animated
Animated values are only compatible with one driver so if you use native driver when starting an animation on a value, make sure...
Read more >
Master React Native Animations - Code Daily
This is where the useNativeDriver option comes in. ... At this time it's support for timing and spring and Animated.event when it is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found