I want to insert a new line (like \\r\\n, ) in a Text component in React Native.
If I have:
Hi~ this
There are two options:
Option 1: Using Template Literals.
const Message = 'This is a message'; {` Hi~ ${Message} `}
Result:
Hi~ This is a message
Option 2: Use {'\n'} as line breaks.
Hello {'\n'} World!
Hello World!