In my react app, I receive a text from the API like "Fully furnished luxury apartment for sale in San Fransisco.↵↵The following features are available↵↵-Water↵ -T...".
I need to render this text as a multiline text with blank lines instead of these return characters. I used the following method to render the text.
<div className="previewSectionDesc">
{<div dangerouslySetInnerHTML={{ __html: propertyDescription }} />}
</div>
But this is what I received with no blank lines.
Fully furnished luxury apartment for sale in San Fransisco. The following features are available -Water -T...
How can I solve this?
<br/>tags instead, and avoid using the rather nastydangerouslySetInnerHTMLaltogether?