Currently, I am developing a reactjs
application where I receive multi-line text data from the backend. When I log the text received, it appears as follows:
Gladiator
Enya
Cricket
I am trying to present this text in its original form within my reactjs
application, illustrated below.
<div>
<span>{postData.heading}</span>
</div>
However, when using this code snippet, the output is displayed as Gladiator Enya Cricket
all on one line. Is there a way to show this text with line breaks, resembling how it is sent from the backend?