skip to Main Content

Javascript – JSX if-else condition

My simple component looks like this: function Messages(props) { return ( <View> <View style={styles.messageWrapper} > <View style={styles.isNotMine}> <View style={styles.message} > <Text>{props.text}</Text> <Text style={styles.messageTime}>{props.time}</Text> </View> </View> </View> </View> ); } export default Messages; I want to put some logic into JSX,…

VIEW QUESTION
Back To Top
Search