How to cancel <Text> line break?

Asked

Viewed 2,744 times

1

I’m nesting several components <Text> then the problem is that at the end of each <Text> React breaks a line. I know if I do it that way:

<Text>
  <Text>Oi</Text>
  <Text>Oi</Text>
  <Text>Oi</Text>
</Text>

It will break only at the end, but I really need to cancel this line break in some way, because during my text there will be figures in the middle and other components, and this line break really is getting in the way of all the formatting. Is there any props or something I can use to cancel the automatic line break?

  • Is there any way you can give more information of continuation of your code? from the part you say e esta quebra de linha realmente está atrapalhando toda a formatação, maybe it is some other problem and/or can be solved in another way.

  • Regarding cancel the line break, I did a search and did not find any way or property of the text that does this.

1 answer

3

Using flexbox:

<View style={{flex:1, flexDirection:'row'}}>
  <Text>abc</Text>
  <Text>123</Text>
</View>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.