Quantcast
Channel: How to use TouchableNativeFeedback in React native android? - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by Rohan Kangale for How to use TouchableNativeFeedback in React native android?

$
0
0

Firstly, you need to import the respective dependency(TouchableNativeFeedback):

import { TouchableNativeFeedback, View, Text } from 'react-native';

After this, you can use it as:

<TouchableNativeFeedback onPress={() => this._onPressButton()} key={index}>
     <View>
         <Text>Click Me</Text>
     </View>
 </TouchableNativeFeedback>

Note: Make sure to add the respective click function(this._onPressButton()) in your code, otherwise you will get an error.


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>