Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 在呈现html字符串时应对本机webview性能问题_Reactjs_React Native - Fatal编程技术网

Reactjs 在呈现html字符串时应对本机webview性能问题

Reactjs 在呈现html字符串时应对本机webview性能问题,reactjs,react-native,Reactjs,React Native,我试图运行一些html标记,我从一个api获得,但发现很难使性能像本机一样好 我曾尝试使用react native webview,但存在严重的性能问题 我也尝试过react native render html,但在运行一些标记时也遇到了一些问题,例如,与react native htmlview相同的内联样式。它以本机性能正确呈现其他每个标记 这是我从api(toRender)获取的html字符串示例 import React,{Component}来自“React” 从“react nat

我试图运行一些html标记,我从一个api获得,但发现很难使性能像本机一样好

我曾尝试使用react native webview,但存在严重的性能问题

我也尝试过react native render html,但在运行一些标记时也遇到了一些问题,例如,与react native htmlview相同的内联样式。它以本机性能正确呈现其他每个标记

这是我从api(toRender)获取的html字符串示例

import React,{Component}来自“React”
从“react native render HTML”导入HTML;
const toRender=“

除以10/2

” 类屏幕扩展组件{ 渲染{ 返回( ) } } 导出默认问题屏幕
请分享一些代码好吗?仅仅征求意见可能没有帮助,但是有了一些小背景和你的试验,你可能得到的不仅仅是产品建议。谢谢你的建议!可以分享一些代码吗?仅仅征求意见可能没有帮助,但是有了一些小背景和你的试验,你可能得到的不仅仅是产品建议。谢谢你的建议!
import React, {Component} from 'react'
import HTML from 'react-native-render-html';


const toRender = "<p style='text-decoration: underline'>divide <sup>10<sup>/<sub>2</sub></p>"


class QuestionScreen extends Component{

render{
  return(
    <View style={{ flex: 1 }}>
       <HTML
          html={toRender}
       />
    </View>
)

}
}

export default QuestionScreen