React Native: "Auto" -Breite für Textknoten

Ich habe ein Textelement in einer Ansicht:

<View><Text>hello world foo bar</Text></View>

als Teil eines flexiblen Gitters.

Ich möchte, dass diese Ansicht eine automatische Breite hat, die auf dem Inhalt, d. H. Der Länge des Texts, basiert.

Wie erreiche ich das?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage