我想在 React Native 的 Text 组件中插入一个新行(如 \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.
原文由 Curtis 发布,翻译遵循 CC BY-SA 4.0 许可协议
这应该这样做: