Skip to content
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(hooks): do not add mouse and touch events in React native #1472

Merged

Conversation

silviuaavram
Copy link
Collaborator

@silviuaavram silviuaavram commented Feb 17, 2023

What:
Do not add mouse and touch events from useMouseAndTouchTracker in the case of React native.

Why:

Fixes #1315.

How:
Check in useMouseAndTouchTracker if isReactNative, and return directly from the useEffect. The return values will always be false on react Native, but this is also done in Downshift, so it's consistent.

Checklist:

  • Documentation
  • Tests
  • TypeScript Types
  • Flow Types
  • Ready to be merged

@silviuaavram silviuaavram marked this pull request as ready for review February 17, 2023 08:37
@silviuaavram silviuaavram force-pushed the fix/hooks/prevent-mouse-tracker-on-react-native branch from f11503a to c3bb2ef Compare February 17, 2023 08:47
@silviuaavram silviuaavram merged commit 694f2af into master Feb 21, 2023
@silviuaavram silviuaavram deleted the fix/hooks/prevent-mouse-tracker-on-react-native branch February 21, 2023 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useMouseAndTouchTracker will not work with React Native
1 participant