Description
This issue is meant as an FYI and a place to start a discussion about react-native's webview.
Facts
- UIWebView is being deprecated in iOS 12 in favor of WKWebView.
- React native's webview uses UIWebView (and implicitly so does reactxp). Facebook has no plans to fix this.
- Facebook is talking about ripping out it's webview support entirely in favor of existing community implementations so that they can focus on react native's core and also because Facebook doesn't use webview internally. If you look at their issues, a large portion of them are about webview because they are basically just ignoring it
Long story short, I think that reactxp will need to make some decisions on what to do here. Here are a few possibilities I can think of (I like idea #1 the most).
-
Reactxp could ship a new implementation of webview that uses "react-native-wkwebview-reborn" for iOS and "react-native-webview-android" for Android under the hood. These seem to be the currently accepted community implementations that meet the basic requirements that react-native's current webview do not meet. I think this could be a good opportunity for reactxp to solve a common problem for its user base. Otherwise, xp apps that need webview will need to individually do this work manually (see idea Update tag in link.md #3).
-
Similar to the previous idea, but reactxp could write native webviews from scratch on each platform. This would avoid the external dependency on 3rd party OSS, but is re-inventing the wheel. One upside of this is that it would be easier to write a shared + consistent interface between the platform specific webviews, which were not written to be used together easily.
-
Reactxp could deprecate the webview, and point to existing platform-specific community solutions.