Quantcast
Viewing latest article 1
Browse Latest Browse All 5

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

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 latest article 1
Browse Latest Browse All 5

Trending Articles



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