Skip to content

Files

Latest commit

 

History

History
18 lines (13 loc) · 666 Bytes

react-jsx-css-line-break.md

File metadata and controls

18 lines (13 loc) · 666 Bytes
title version revision
Break-lines in jsx
0.1.0
1

Break lines in jsx.

<p>Hello{"\n"}World</p>

When white-space: pre-line is not specified, the \n will be replaced with space . to avoid this, we have to put white-space: pre-line or, more simply, use <br/> tag for breaking line to make everything work universally across web frameowks.

This option can be toggled via coli-escape-string#jsx's config

https://developer.mozilla.org/en-US/docs/Web/CSS/white-space https://stackoverflow.com/questions/36260013/react-display-line-breaks-from-saved-textarea