Good day everyone. please what is React Native’s replacement of React’s e.target.innerText? I’m trying to get what a user click on from TouchableOpacity component. I’m building a React Native quiz app. I used TouchableOpacity for the options. I’m using onPress function to get the options the user clicks on with onPress = {(e) => this.props.answer(e, question)} So creating the answer function … how do I determine if the user has chosen the correct answer. If it’s normal React I’d have used:
onAnswer = (e, newQuestion) => { e.target.innertext === questions[newQuestion].answer ? this.correct() : this.wrong()
Please help me out here.