skip to Main Content

I just want to ask a question. I have been playing around with WebView’s lately and have issues in integrating the WebView in my React Native App, I have even tried many library’s such as:

react-native-pell-rich-editor
react-native-render-html
react-native-htmlview

My WebView’s sits inside a Flat List so I have many WebView’s that are rendered inside this list, I was using Scroll View and rendered the WebView’s in a Scroll View but had issues when using WebView’s this way and using the libraries I have mentioned. When I take out the WebView’s and use a Text component, everything works fine but I need to use a WebView to render the html coming back from the server.

So my question is that should I create a Custom WebView natively, using Java as the native language as my React Native app is for Android and using this Custom WebView as a library inside React Native?

I found this link:

https://reactnative.dev/docs/custom-webview-ios

But the tutorial is for IOS, so I’m trying to find an Android Alternative. If someone could point me to the right direction that would be appreciated.

2

Answers


  1. Have you tried this react-native-webview library in react native?

    I can dynamically change many HTML pages and use them with this library. I did not encounter any problems.

    Getting Started

    Login or Signup to reply.
  2. When dealing with multiple WebViews inside a FlatList, performance and compatibility issues can arise.

    You can directly use the third party libs:

    react-native-webview

    This is the best for handling dynamically content in html as well custom html.

    Still you like to go with custom webview ?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search