Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Javascript
react replace all line breaks with br
naser
Programming language:
Javascript
2021-06-16 09:57:55
0
Q:
react replace all line breaks with br
user265854
Code:
Javascript
2021-06-14 16:31:18
{ string.split('\n').map((line, i) => ( <span key={i}> {line} <br/> </span> )) }
0
Tags
react
line
replace
Related
draw a line with title in react
js replace all spaces
javascript replace line breaks with br
removed spaces in string js
suppress spaces in front and in the end of a string javascript
javascript replace all spaces with dashes
Removing borderline of input in react
how to place a line break in react native
javascript detect space in string
replacing each space in a string javascript
multiline comment in react
javascript remove all spaces from string
react link underline
js find space in string
split whitespace except in quotes javascript
New to Communities?
Join the community