React Native - How to perform a really soft vibration?

Viewed 1686

How to perform a really soft vibration in react native?

I am trying to get the same vibration as in the app "Binance" (testing on iPhone 11) when pressing bottom tabs. I don't know if this app is implemented in React Native, but I enjoy the little vibration when moving between tabs.

But, when I do

   <Tab.Screen
      name="Home"
      component={HomeStacks}
      listeners={() => ({
        tabPress: () => {
          Vibration.vibrate(); // from react-native
        },
      })}
    />

in my app, testing in the same device, the vibration is really hard.

I am not saying this for the duration, but for the very force of the vibration.

Any ideas? Is it possible using react native?

Pd: I have tried to use

Vibration.vibrate(50)

in order to reduce the duration, but it disappears (no vibration)

1 Answers

The solution was to use this package from Expo:

And then add an haptic feedback like this:

   <Tab.Screen
      name="Home"
      component={HomeStacks}
      listeners={() => ({
        tabPress: () => {
          Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
        },
      })}
    />
Related