Adding a new line in a JSX string inside a paragraph – React

Set CSS-Style for the paragraph as below, it will break line on \n and wrap text according to parent width.

white-space: pre-wrap;

or

white-space: pre-line;

Leave a Comment