in html I can achieve this by
<span style="background-color:red">ketan</span>
but in react native how to implement this so that color will be applied to the text only.
If you want the background color to only encompass the text, you can use this:
<Text style={{backgroundColor: 'blue', alignSelf: 'flex-start'}}>
Ketan
</Text>
And just change alignSelf as needed, you need to set this property if you dont want the text to take the whole width of the container