-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat: add optional haptic feedback #5
Conversation
Hi @ksitko, thanks for another contribution for an important feature. As you said, I tried it with I understand your concern about installment. We can add it to the docs to let user know they have to install it if needed. I will check your PR and try examples with haptic. Will let you know. Thanks! 🙌🏽 |
@ksitko @enesozturk you could use the new metro feature |
@enesozturk ahh sorry did not check the code 😅
exactly |
Ah, ok than 😄
|
I personally didn't like Regardless of what library, what do you think about having haptics be an out of the box default such that so long as whatever haptics library has been installed, |
@ksitko I checked the haptic feedback and it works pretty well. Looks like When I first try haptics, it was like how you are telling actually. Letting user call any function with a callback like const hapticFunction = ()=>{
// Call expo-haptic or react-native-haptic-feedback methods
}
<HoldMenu onActivate={hapticFunction} />
// This is going to be called in onCompletion in HoldItem.tsx |
Not entirely. I'm suggesting is that instead of requiring the user to configure and provide a hapticFunction, |
Ah I just realized that this library already has a dependency of |
This time it will needed to be write native module and it effects the installation process as well as I understood.
Yes 😄 I think |
I just replaced |
You already committed... 😄 Checking [Edit]: Perfect 👌🏽 🙂 @ksitko |
Motivation
I was hoping to start a discussion about haptic feedback. This library nails down the "pop" for a hold menu wonderfully, but it's hard to not notice that it's missing any sort of haptics. I found that you at one point added expo-haptics in c3e8105 then removed it the next commit. Would you mind sharing as to why?
This somewhat opinionated PR is dependent on
react-native-haptic-feedback
and in order to experience the haptics you have to installed it. But it isn't necessary to have it installed for thereact-native-hold-menu
library to work. But it does give a quick and easy out of the box experience for users of this library. Let me know what you think and if this is a path you'd like to go down.