How to show html in react native webView?

  android, react-native

I’m using a webView for rendering a piece of html but instead of rendering it shows the code. What is the problem?

My code is…

<WebView
    source = {scoLocal['sco']}
    javaScriptCanOpenWindowsAutomatically={true}
    javaScriptEnabled={true}
    domStorageEnabled={true}
    style={[styles.textArea, {
      width: '100%',
      height: '100%',
      maxHeight: '100%',
      maxWidth: '100%'
  }]}
    />

Source: Android Questions

LEAVE A COMMENT