我想在 React Native 的文本组件中插入一个新行(如 \r\n、
)。
如果我有:
<text>
<br />
Hi~<br />
this is a test message.<br />
</text>
然后React Native渲染Hi~ this is a test message.
是否可以渲染文本来添加新行,如下所示:
Hi~
this is a test message.
这应该可以做到:
<Text>
Hi~{"\n"}
this is a test message.
</Text>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)