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

React Native onStartShouldSetResponder and onResponderRelease?

$
0
0

I've created a button that I want to have call a function on click and then again on release. A normal TouchableOpacity or other will trigger a function upon release of a click only, I need functions on both click AND release.

<View
    style={styles.touchbutton}
    onStartShouldSetResponder={() => this.clickOn()}
    onResponderRelease={() => this.clickRelease()}>
    <Text style={styles.dark}>Button</Text>
</View>

The above code works on click but not on release. I also tried onResponderReject but that doesn't work either. Hard to find what the command should be.


Viewing all articles
Browse latest Browse all 16552

Trending Articles



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