react-native-webview: multiple webview hangs the app

import { WebView } from 'react-native-webview';

class Discussions extends Component {
  render() {
  let { htmlData } = this.props;
    return (
      <WebView
        source={{ html: htmlData }}
        style={{ marginTop: 20 }}
      />
    );
  }
}

I have list of discussions, where all the discussion data in html, if i loop through discussions > 20, then the app crashes.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 17 (10 by maintainers)

Most upvoted comments

oh ok I understand your issue if think. Use overflow: ‘hidden’ around the webviews, there is a bug since android 0.57 that makes webviewLoadingScreen overflow all over the screen.

We have the same problem in our codebase. Rendering multiple webviews, with heavy websites being loaded, I guess, are causing crashes for us.

I can’t say for sure yet if it’s because we simply load multiple webviews or if it has to have the combination of loading multiple webviews with heavy websites being loaded in them.

It would be great if someone could try out in an isolated test to see where the problem comes from. At the moment I personally can’t spend much time with it.

EDIT: This is easily seen in an Android emulator, although we have crash reports in iOS as well.

@Titozzz its Android and all of the discussions are having Mathjax, its taking time to load, is there any possibility to reuse the WebView or can i show only 5 WebView at a time