Skip to content

Instantly share code, notes, and snippets.

@wynnzen
Created August 26, 2016 04:07
Show Gist options
  • Save wynnzen/40d173f9fd14a52af6aa3b509f018eee to your computer and use it in GitHub Desktop.
Save wynnzen/40d173f9fd14a52af6aa3b509f018eee to your computer and use it in GitHub Desktop.
react textarea javascript line break
{this.props.section.text.split(“\n”).map(function(item) {
return (
<span>
{item}
<br/>
</span>
)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment