Replies: 3 comments 2 replies
-
I updated the label from Q&A to Ideas, hoping for more visibility on this 🤞 😄 |
Beta Was this translation helpful? Give feedback.
1 reply
-
I am having the same issue, and your solution crash on the latest react-native-reanimated version |
Beta Was this translation helpful? Give feedback.
1 reply
-
Looks like this has been merged so we can close this discussion |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello :)
First: Thank you for this amazing library, it is really awesome
I have a question regarding what we could call "ScrollHandler composition".
I was wondering if there was a clean way to "compose"/"merge" 2 different
useAnimatedScrollHandler
hook ?why
Let's say I want to create a Fancy ScrollView that use
useAnimatedScrollHandler
internally to do some animation, on the background color for example.I want to expose this new component to the team and let them use their own animations (in addition to mines) using
reanimated
primitives.Maybe I missed something in the documentation, but as of today it seems that there is no easy way to do it.
We have to provide a custom API for our
FancyScrollView
to handleonScroll
,onMomentumScrollEnd
etc ...This is not ideal because now the implementation details of our FancyScrollView have somehow leaked outside our component.
Example
Possibly terrible solution
With my zero expertise in ReAnimated, I managed to code a helper function to easily compose
onScroll
handler.I'm pretty sure I should not call
ref.current?.worklet(event)
myself nor usinguseHandler
that way but it seems to work.(I removed the typing for simplicity)
Thank you for your answers and your time ... and this Library
Beta Was this translation helpful? Give feedback.
All reactions