Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The touchable area in react-native can be managed using the built-in touchable components provided by the framework. These components include:

  1. TouchableOpacity: This component is used when we want to add an opacity effect to the touchable area when it’s pressed. It supports children components and is wrapped around them to make them touchable.

  2. TouchableHighlight: This component is used when we want to highlight the touchable area when it’s pressed. It supports children components and is wrapped around them to make them touchable.

  3. TouchableWithoutFeedback: This component is used when we want to make a touchable area without any feedback. It doesn’t provide any visual feedback when it’s pressed. It also supports children components and is wrapped around them to make them touchable.

  4. TouchableNativeFeedback: This component is used when we want to add custom native feedback to the touchable area when it’s pressed. It is only available on Android platforms.

To manage the touchable area, we can use the properties provided by these touchable components such as onPress, onLongPress, delayPressIn, delayPressOut, etc. to customize the touchable behavior according to our requirements.