Skip to content
Advertisement

What is {‘ ‘} in react-native?

I was working on a collaborative project and there is a lot of {' '} used.

Examples –

<Text>
     {' '}
     {constant.Messages.PointText.hey} {this._user.first_name || this._user.business_name}!{' '}
</Text>
<Text>
     {' '}
     {constant.Messages.PointText.redeem}{' '}
</Text>

constant. is text as a constant.

Advertisement

Answer

You can use {' '} syntax to insert intentional whitespace (or tabs, newlines, etc).

Advertisement