-
Notifications
You must be signed in to change notification settings - Fork 116
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
Expo & Bare RN haptic interop #3
Comments
I just made an attempt to implement this but it seems that optional requires are broken in the latest Metro for some weird reason. I've been running into:
This seems to be tracked at: facebook/metro#666 Disabling So I think an alternative would be to simply remove the haptics implementation from the library and just provide a callback which the user can handle themselves to trigger haptics. Meaning, instead of Or it could be more generic, so that the user could do: |
Removes dependency on react-native-haptic-feedback Allows user to provide their own haptics implementation Closes coinjar#3
Removes dependency on react-native-haptic-feedback Allows user to provide their own haptics implementation Closes #3 Co-authored-by: Andrei Alecu <andreialecu@users.noreply.github.com>
The Actually I can't seem to figure out why this is. |
…-fix Fixing the Gradient component
Based on the discussion in #1.
It would be nice to have the ability to support haptic feedback in Expo managed projects (as well as bare React Native projects – which is what we support currently).
I think the ideal approach is @andreialecu's module detection technique. We should list
expo-haptics
(for Expo managed projects) andreact-native-haptic-feedback
(for bare RN projects) as optional peer dependencies, and if the library detects thatexpo-haptics
is installed, then prefer that overreact-native-haptic-feedback
.The text was updated successfully, but these errors were encountered: