1.0.10 • Published 2 years ago

react-native-pressable-opacity v1.0.10

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

<PressableOpacity>

A component for responding to touches using the new JS Pressability API.

<PressableOpacity onPress={onBuyPressed} style={styles.buyButton}>
  <Text>Buy this Product</Text>
</PressableOpacity>

The following props are supported:

<NativePressableOpacity>

A supercharged <PressableOpacity>.

Requires react-native-gesture-handler and react-native-reanimated (v2)

A component for responding to touches using the native TapGestureHandler without ever going over the JS Bridge. Use this component if you want your Pressables to be able to receive touches, respond to touches, show visual animated feedback (opacity change) and dispatch a callback to JS without using the React Native Thread at all. This component will always be pressable, even when the React Native (JS) Thread freezes because of a heavy JS computation.

⚠️ Warning: This does not work in Modals on Android devices. See software-mansion/react-native-gesture-handler issue #139

<NativePressableOpacity onPress={onBuyPressed} style={styles.buyButton}>
  <Text>Buy this Product</Text>
</NativePressableOpacity>

The following props are supported:

Also try