I want to insert a new line (like \\r\\n,
) in a Text component in React Native.
If I have:
Hi~
this
https://stackoverflow.com/a/44845810/10480776 @Edison D'souza's answer was exactly what I was looking for. However, it was only replacing the first occurrence of the string. Here was my solution to handling multiple tags:
{shortDescription.split("
").join("\n")}
Sorry, I couldn't comment on his post due to the reputation score limitation.