Q:

React Native: "Auto" width for text node

I have a text element inside a view:
<View><Text>hello world foo bar</Text></View>
as part of a flex grid.
I want this view to have an auto width based on the content i.e. length of the text.
How do I achieve this?

A:

You can achieve this if element will have alignSelf property, like:
alignSelf: 'flex-start'

or
alignSelf: 'center'

