mirror of
https://github.com/status-im/react-native-webview.git
synced 2025-02-23 17:28:37 +00:00
Merge pull request #3 from react-native-community/webkit-default
Defaults to WKWebView instead of UIWebView
This commit is contained in:
commit
13ab5d6b41
@ -33,7 +33,6 @@ class MyWebComponent extends Component {
|
||||
render () {
|
||||
return (
|
||||
<WebView
|
||||
useWebKit // to use WKWebView -- will be default at some point
|
||||
src={{uri: "https://infinite.red/react-native"}}
|
||||
style={{marginTop: 20}}
|
||||
/>
|
||||
@ -48,11 +47,12 @@ Additional properties are supported and will be added here; for now, refer to th
|
||||
|
||||
## Migrate from React Native core WebView to React Native WebView
|
||||
|
||||
Simply install React Native WebView and then use it in place of the core WebView. Their APIs are currently identical.
|
||||
Simply install React Native WebView and then use it in place of the core WebView. Their APIs are currently identical, except that this package defaults `useWebKit={true}` unlike the built-in WebView.
|
||||
|
||||
### Contributor Notes
|
||||
|
||||
* I've removed all PropTypes for now. Instead, we'll be moving toward Flow or TypeScript at a later date
|
||||
* UIWebView is not tested fully and you will encounter some yellow warning boxes. Since it is deprecated, we don't intend to put a lot of time into supporting it, but feel free to submit PRs if you have a special use case. Note that you will need to specify `useWebKit={false}` to use UIWebView
|
||||
|
||||
## Maintainers
|
||||
|
||||
|
@ -126,6 +126,7 @@ class WebView extends React.Component {
|
||||
static NavigationType = NavigationType;
|
||||
|
||||
static defaultProps = {
|
||||
useWebKit: true,
|
||||
originWhitelist: WebViewShared.defaultOriginWhitelist,
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user