Not sure why only the first onPress is working, other onPress no response..., just use the same way to wrap the function, but other onPress didn't respond at all
const ToMainScreen = () => { navigation.navigate('Main')}const AskQuestion = () => { setQuestionDisplay(true) console.log("abc")}<TouchableOpacity onPress={ToMainScreen} ><Image style={styles.homeIcon} source={require('../image/homeIcon.png')} /></TouchableOpacity><TouchableOpacity ><Image style={styles.nextPageIcon} source={require('../image/nextPage.png',)} /></TouchableOpacity><TouchableOpacity ><Image style={styles.previousPageIcon} source={require('../image/previousPage.png',)} /></TouchableOpacity><TouchableOpacity onPress={AskQuestion}><Image style={styles.questionIcon} source={require('../image/question.png',)} /></TouchableOpacity>