DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
react replace all line breaks with br
{ string.split(' ').map((line, i) => ( <span key={i}> {line} <br/> </span> )) }
PREVIOUS
NEXT
Tagged:
#react
#replace
#line
#breaks
#br
ADD COMMENT
Topic
COMMENT
Name
9+6 =
Submit