onclick function is not working in react native application
You need to use one of the following wrapper components. Below are just the ones listed, which are available cross-platform.
TouchableHighlight
<TouchableHighlight onPress={this.openPopup}>
<View>...</View>
</TouchableHighlight>
TouchableOpacity
<TouchableOpacity onPress={this.openPopup}>
<View>...</View>
</TouchableOpacity>
TouchableWithoutFeedback
<TouchableWithoutFeedback onPress={this.openPopup}>
<View>...</View>
</TouchableWithoutFeedback>
Note the above are on their way to being deprecated. Check out Pressable
Try this-
<TouchableOpacity onPress={this.openPopup}>
<View> <Text>...</Text> </View>
</TouchableOpacity>