How can I insert a line break into a text component in React Native?
I checked here about my problem.
But my case is a little bit different.
So it doesn't work with that way.
This is my container code and it gives props to ContactInfo.
return data.map(
(contact, i) => {
return (<ContactInfo contact={contact} key={i} />);
}
);
This is child component. It recieves props as contact.
<Text>{this.props.contact.name}</Text>
And finllay, it gives the result 'name'.
I expect
David
John
Wade
But it gives 'DavidJohnWade'.
I can't put {"\n"}
and ` into of child component since that is only one line.
How can i solve this?