br br replace with newline in react code example
Example: react replace all line breaks with br
{
string.split('\n').map((line, i) => (
<span key={i}>
{line}
<br/>
</span>
))
}
{
string.split('\n').map((line, i) => (
<span key={i}>
{line}
<br/>
</span>
))
}