我有一个与我的后端通信的 RN 应用程序。在这个应用程序中,有一些具有动态样式的字段。它以非常标准的格式格式化。
asterix
粗体文字asterix
asterix
asterix
斜体文字
我想使用这个字符串(我从后端获得)来呈现一个适当样式的组件。例子:
render("this *is bold*) = <Text> this <Text style={fontWeight: "bold"}> is bold </Text> </Text>
关于如何去做这件事的任何想法?