0

I have an API that outputs some text extracted from MongoDB in JSON format. I want to show the text in my React Native, but I want to keep the newlines.

How should I store the newlines in my MongoDB so that I can print the text in my API and still show the text with newlines in React Native?

I'm wondering if I should use \n since I cannot use <br> since React Native is not able to render HTML.

Jamgreen
  • 10,329
  • 29
  • 113
  • 224

0 Answers0