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
Conditionally enable/disable tracking? #14
Comments
Hi @slapbox - Thanks for your kind words and for your suggestion. I very much appreciate it. Having a disable feature seems like a useful option. I will get to work on it and post back here when it is ready. |
@ethanselzer I'm glad you like the idea and thanks again for the great project and all your work! |
@slapbox - Support for enabling and disabling has landed in v2.3.0. Please give it a try and let me know your thoughts. Thanks! |
@slapbox - I'm going to close this as fixed. Thanks again for opening the issue and raising my awareness to the use case. I really appreciate it. If you find react-cursor-position useful, please consider starring it on GitHub. Starring helps to grow the project, which is good for everyone. |
Fixed by v2.3.0 |
This is an awesome package and thank you very much for it.
I am using it in a case where I only need to track the cursor in very select circumstances, and I'd love a way to disable the tracking when it's not needed to reduce re-renders.
I can conditionally load it, but that means unmounting and remounting the child components which has some side effects. Is there anything I can do about CPU usage?
Thanks again very much.
The text was updated successfully, but these errors were encountered: