-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bad performance if setState while running animation #6247
Comments
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? |
Hey! The If you want to show fps when you drag the slider, you can use a trick with the animated Alternatively, if you want to make further optimizations, you can get rid off this |
Hi, thank you for your suggestion but this is a temporary solution for my current issue. I did not face this issue until I upgraded react-native from 0.73 to 0.74, enabled new Architecture and upgraded react-native-reanimated from 3.7.0 to 3.13.0. |
Thank you for details. Could you please upgrade to |
I test it in release mode, it behaves better than in debug mode. Guess may be because of my device. I will improve my code to add a debounce function that should help resolve my problem. Thank you! |
Does anyone have a solution for this? I am on RN 0.74.5 and Reanimated version 3.10.1. I cant update to a higher version of reanimated, since it has to be installed with Expo. Running the "npx expo install react-native-reanimated" only seems to allow for the 3.10.1 version. Please help this is a really big issue. |
Description
Screen.Recording.2024-07-10.at.11.16.23.mov
Slider.tsx
Usage:
The difference between the first and second Slider is that the first Slider does not setState while changing value, so it behaves smoother.
Steps to reproduce
just setState when running animation
Snack or a link to a repository
null
Reanimated version
3.13.0
React Native version
0.74.2
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native
Architecture
Fabric (New Architecture)
Build type
Debug app & dev bundle
Device
Android emulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: