Answers for "react replace all line breaks with br"

0

react replace all line breaks with br

{
    string.split('\n').map((line, i) => (
        <span key={i}>
            {line}
            <br/>
        </span>
    ))
}
Posted by: Guest on September-30-2020

Code answers related to "react replace all line breaks with br"

Code answers related to "Javascript"

Browse Popular Code Answers by Language