我在几个嵌套的View组件内的react native文本组件中显示文本。我从所谓的服务中检索此文本。每次通话的文本不同。在某些情况下,react native(iOS和android)会在一个单词的中间自动中断文本。例如:我有一个dog如何强制本机反应以将单词保持在一起/仅在单词之间进行换行?
要中断文字
<View style={styles.container}>
<Text style={styles.paragraph}>
Hello This is an example of
{'\n'}
multiline text
</Text>
<Text style={styles.paragraph}>{`Here is an other way to
set multiline text.`}</Text>
</View>