I have a function:
renderConversations(){
let conversationContent = this.state.conversationArray.map((convObj, i) => {
return <View key={i} style={[globalStyle.conversationContainer,globalStyle.shadow]}>
<Text style= {globalStyle.conversationText}>{ convObj.text }</Text>
<Text style= {globalStyle.conversationText}>{ convObj.actionButtons }</Text>
</View>
})
return conversationContent
}
I'm rendering the component using this function depending on the state variable. A challenge I'm facing is convObj.actionButtons here is an array. I want to iterate over that inside the map function to build the component. Is there a way to do this inside the map function, or do I need to use the good old for loop?