Check out example codes for "how to get new line to display in rails". It will help you in understanding the concepts better.
Code Example 1
<%= obj.description %> Even though your value may be "One \t \n \n Two", it will show up on the screen as "One Two". To get those new line characters to actually separate the lines when displayed, you'll need to convert them to HTML before rendering: <%= obj.description.gsub(/\n/, '<br/>') %> Of course, if users are entering data that will be included in your HTML, you should be escaping the values to protect against XSS. If new lines are the only thing you need to support, it should be as simple as this: <%= h(obj.description).gsub(/\n/, '<br/>') %>
Learn ReactJs, React Native from akashmittal.com