-
-
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
use hook useFrameCallback error #6158
Comments
Hey @jameheller98 I have so many questions. Could you tell us what exactly is the problem? When i tried using your code that you provided, all of our examples using |
Funfact: if you change |
This here video example about error: Uploading screen-20240624-204905~2.mp4… I have found error when ref.current.callbackId not update in useEffect hook you can check. |
@jameheller98 there is no video 😄 |
4623345153037303709.mp4You can check again. And file fix you can check |
@jameheller98 alright, I can see there is some kind of error but I can't really go into detail and investigate without any reproduction. Please refer to how to make a minimal repro. Your file fix unfortunately doesn't do the job - it breaks the logic of callbackId (stopping and activating callbacks doesn't work anymore because of wrong callbackId). Other than that, I am also a bit puzzled that your fix contains changes to the code that weren't there yet as of 3.12 (they are present only on main branch and a few recent nightly builds). |
Okay I have found problem, its terrible with my code and thank to issue #5525, I fix my code I had use |
Description
I test useFrameCallback and its not work, after I check hook useFrameCallback in library, and I fix code and its work, i dont know how to useRef work to object and you can check code me about problem.
Steps to reproduce
useFrameCallback in project
Snack or a link to a repository
https://snack.expo.dev/@jameheller98/useframecallback
Reanimated version
^3.12.0
React Native version
0.71.7
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native
Architecture
Paper (Old Architecture)
Build type
Debug app & dev bundle
Device
Android emulator
Device model
Google pixel 6
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: