TextWithNewlines
A React Component for turning text with newlines into semantic paragraphs.
Installation
npm install --save textwithnewlines
Usage
; const sampleText = `The first paragraph Another paragraph. A third paragraph`; Component { return <TextWithNewlines>sampleText</TextWithNewlines>; }
Which will output:
First Paragraph Second Paragraph Third Paragraph