-
Notifications
You must be signed in to change notification settings - Fork 933
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
fix(useMouchAndTouchTracker): add refs to effect deps #1609
fix(useMouchAndTouchTracker): add refs to effect deps #1609
Conversation
Thank you for the PR, will take a look! |
@silviuaavram Any update on this one? |
Looked at it and I would try to avoid adding and removing event listeners on every render. I would propose this one instead. @aliceHendicott @seedy could you confirm the fix, please? It should be available as 9.0.7-alpha.1, once we are good to go I will release 9.0.7 with the fix. Thank you! |
Actually just go for |
Hey @silviuaavram, thanks for getting an alpha release out. I forked @aliceHendicott's example and upgraded to Screen.Recording.2024-07-10.at.10.04.28.AM.mov |
Thanks for the sandbox! Will let you know once I get some updates on this one. |
Still looking into how to do it without adding and removing the handlers on each render. Will update on the progress. |
Hi @silviuaavram 👀 wonder if there's any updates for this? |
9.0.7-alpha.3 @SL-23 let me know if it works now. |
Hey @silviuaavram it works now. Thank you so much! |
What:
Why: this ensures mouse and touch tracker effect is always up to date with its refs bindings.
How: added a dependency to a useEffect
Checklist: