-
Notifications
You must be signed in to change notification settings - Fork 188
Enable reanimated/rn feature flags to allow accurate scroll events tracking #79
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested this on a physical device and the issue is fixed!
LGTM
Apparently this will require native update and also effectively turns off the iOS prebuilds for the project. I hope the flag will be enabled in the next RN release though |
} from "@/components/CurrentlyLive"; | ||
|
||
const AnimatedFlatList = Animated.createAnimatedComponent(FlatList) as FlatList; | ||
const AnimatedFlatList = Animated.FlatList; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like just the change to this file fixes the sticky header jumping (using react-native FlatList), without having to change app.config.ts
and package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That change will definitely not fix the issue, its more like this one optimized it (but its still happening randomly): c4509a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately both of these updates are necessary. The changes from c4509a4 while offload the JS thread communication they still don't impact the UI updates from being applied on time. I updated the PR description with some links so you can learn more why these changes are necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes an issue with the sticky day selector jumping intermittently when scrolling past the top position of the selector.
One change is to use
Animated.FlatList
component as opposed to creating one usingAnimated.createAnimatedComponent
. The version that reanimated exports has the throttling defaults set properly such that it avoids event throttling.In addition, we enable feature flags in react native and reanimated that results in the direct ui thread updates from being delayed. Read more here: https://docs.swmansion.com/react-native-reanimated/docs/guides/feature-flags/#disable_commit_pausing_mechanism