Closed LcTwisk closed 2 months ago
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
I'm also seeing this - specifically, onScroll
from a handler created with useAnimatedScrollHandler
is no longer called on scroll in a FlashList
animated via reanimated createAnimatedComponent
. Happy to try early releases to test any fix candidates if it's helpful. Building with Expo for iOS.
I've had to stick to 3.6.2 to not break my animations with FlashList (it's especially noticeable when mid-scroll and updating objects in an array).
Hey @erquhart @LeslieOA @LcTwisk could please try out the following patch? reanimated_3.13.0_styles.patch
Hey @erquhart @LeslieOA @LcTwisk could please try out the following patch? reanimated_3.13.0_styles.patch
I’m using Expo prebuild, but will see if I can create a confit plugin (or use build properties [???]) to apply the patch. If not: I’ll branch and manually patch then get back to you later today. 🙏🏾
Hey @erquhart @LeslieOA @LcTwisk could please try out the following patch? reanimated_3.13.0_styles.patch
That's essentially reverting https://github.com/software-mansion/react-native-reanimated/pull/5268, right? Yes, we're using a similar patch at the moment, and it fixed the issues we experienced 👍
The fix should be there by the next stable version (3.14.0 or next iteration of 3.13.x)
@LcTwisk do you mind giving a small explaination on how you've used FlashList
with react-native-reanimated. I can't get the layout transitions to work.
@szydlovsky sorry it took so long to try this out - still broken for me as of 3.10.1.
Edit: apparently I can't read, you said 3.13x+. I'll try the actual patch.
Update: installed 3.14.0, works! Thanks!
Description
The changes in https://github.com/software-mansion/react-native-reanimated/pull/5268 result in animations not properly resetting when a component is being recycled in e.g. a FlashList (even if the
SharedValue
's backing the animation are reset.Was able to work around it by explicitly setting a property that would change when recycling. That results in the
_requiresNewInitials
here to become true (because of a change in props). However, I'm not sure if this is the intended solution for recycling. Any thoughts?A video showing the issue in our app:
The following can be observed: an animation is triggered on component 1, but the state is not being reset when the component is recycled on index 11 (there's a recycle pool of 10 components). The backing
SharedValue
's are being reset when the component is recycled:https://github.com/software-mansion/react-native-reanimated/assets/3274157/f74fb7a2-fe73-47b5-9eab-65248320a8ed
Steps to reproduce
Snack or a link to a repository
Will create a reproduction project later
Reanimated version
3.9.0 (and up)
React Native version
0.72.14
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native
Architecture
Paper (Old Architecture)
Build type
Debug app & dev bundle
Device
iOS simulator
Device model
No response
Acknowledgements
Yes