title: How to replace /n to linebreaks in react.js?
body: <p>I am trying to replace every <code>/n</code> to a <code>&lt;br&gt;</code> tag in <code>ReactJS</code>. In my <code>note.note</code> object there is a string with multiple <code>/n</code> in it. </p>
  
  <p><strong>example note.note:</strong> <code>test\ntest\ntest</code></p>
  
  <p>What I have tried in <code>ReactJS</code>: </p>
  
  <pre><code>{
    note.note.split('\n').map(function( item, idx) {
      return (
          &lt;span key={idx}&gt;
            {item}
            &lt;br/&gt;
          &lt;/span&gt;
      )
    })
  }
  </code></pre>