Touchables

Learn about the touchable components in React Native and see how we can use and style them.

In React Native, touchable components capture tapping gestures and display feedback when a gesture is recognized. These components do not come with any default styling. Therefore, we must put in some extra effort to customize them and make them aesthetically pleasing.

React Native provides four touchable components. We can select any of the components based on the kind of feedback we want. These components are:

  • TouchableHighlight: This component can be used to create buttons that respond to touch events. When the TouchableHighlight component is pressed, its opacity is decreased. This causes the underlying child component’s style to get highlighted. It should be noted that this component only supports one child component. If there is more than one, we should wrap all of them inside a single View component.

  • TouchableNativeFeedback: This is an Android-specific component that can be used to generate a ...

Access this course and 1400+ top-rated courses and projects.