WebView used to come from react-native.
import { WebView } from 'react-native';
but it's been moved to
import { WebView } from 'react-native-webview';
https://github.com/react-native-community/react-native-webview
When using webview from this, it has only ios and android implementation. And thus falls back on default web version for windows. Which then throws an exception because its fully deprecated in RN60.
Thanks @namrog84 . We have an implementation of WebView inside react-native-windows right now. You should be able to access it directly from there to unblock your scenarios at this time (and perhaps let us know if you find anything unsupported).
That said, we will be moving that implementation into the react-native-webview component shortly after the native extensions ABI surface work is completed for ViewManagers.
I am editing the title and adding to Extensions project for tracking.
We'll be unable to get everything out of lean core for M4. Moving to M5.
Now unable to use webview from react-native. It throws exception to use it from react-native-webview. Until we get it from react-native-webview, how can we use it?? It is a blocker.
Webview was working in 0.59.
Since we moved to vnext, it is kind of blocker our development, could you please let me know how to fix it temporary in react native windows code base? it will help us.
๐ Hello, I stumbled upon this. I'm a collaborator on WebView, let me know how I can help!
@safaiyeh Is web view supported in vNext version?
Yeah, waiting for react-native-webview https://github.com/react-native-community/react-native-webview/issues/1191 supported on vNext! ๐
In the meantime, if you're building a RN Windows app, you can get webview to work by doing the following:
Replace import {WebView} from "react-native-webview"
to import {WebView} from "react-native-windows/Libraries/Components/WebView/WebView"
This is awesome! We should make sure to remove the builtin view once that is checked in. We've had a bad habit of forgetting to remove old components after Facebook has extracted them.
We should make sure to remove the builtin view once that is checked in.
Yeah I'll remove it after checking in.
Most helpful comment
In PR: https://github.com/react-native-community/react-native-webview/pull/1220