I have two buttons like this:
<TouchableOpacity onPress={() => this.setModalVisible(true)} style={stylesDropDown.acceptButton}> <Text> Accept </Text> </TouchableOpacity> <TouchableOpacity onPress={() => this.setModalVisible(true)} style=stylesDropDown.refuseButton}> <Text> Refuse </Text> </TouchableOpacity> I want that when the 'setModalVisible' function is executed to know which of these two buttons has been pressed. Any ideas?
buttonPressed, onPress of either of those update the state to the respective string.