Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

React Native- Touchable not working and no errors?

$
0
0

Alright, just trying to detect touch on a view in RN. Followed https://reactnative.dev/docs/handling-touches and incorporated the Touchable around my styled view like so:

<TouchableWithoutFeedback onPress={cardPressed}><View style={styles.card}><Text style={styles.card_Head}>What is Something?</Text><Text style={styles.card_Body}>Something</Text></View></TouchableWithoutFeedback>

Im using a functional component, so after export default function App() { I have:

function cardPressed()    {      console.log('pressed');    }

No errors, but I get nothing. What is wrong w this implementation?


Viewing all articles
Browse latest Browse all 16750

Trending Articles



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