React Newline to break (nl2br)
Kevin Simper
64125

Don’t we need to provide keys to the span-tags?

{this.props.section.text.split(“\n”).map(function(item, index) {
return (
<span key={index}>
{item}
<br/>
</span>
)
})}
Like what you read? Give Paul Kunze a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.