Skip to content

Commit 13ab5d6

Browse files
Merge pull request react-native-webview#3 from react-native-community/webkit-default
Defaults to WKWebView instead of UIWebView
2 parents 14b2f8a + 236e613 commit 13ab5d6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class MyWebComponent extends Component {
3333
render () {
3434
return (
3535
<WebView
36-
useWebKit // to use WKWebView -- will be default at some point
3736
src={{uri: "https://infinite.red/react-native"}}
3837
style={{marginTop: 20}}
3938
/>
@@ -48,11 +47,12 @@ Additional properties are supported and will be added here; for now, refer to th
4847

4948
## Migrate from React Native core WebView to React Native WebView
5049

51-
Simply install React Native WebView and then use it in place of the core WebView. Their APIs are currently identical.
50+
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.
5251

5352
### Contributor Notes
5453

5554
* I've removed all PropTypes for now. Instead, we'll be moving toward Flow or TypeScript at a later date
55+
* 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
5656

5757
## Maintainers
5858

js/WebView.ios.js

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class WebView extends React.Component {
126126
static NavigationType = NavigationType;
127127

128128
static defaultProps = {
129+
useWebKit: true,
129130
originWhitelist: WebViewShared.defaultOriginWhitelist,
130131
};
131132

0 commit comments

Comments
 (0)