Browse Source

Merge pull request #3 from react-native-community/webkit-default

Defaults to WKWebView instead of UIWebView
Jamon Holmgren 5 years ago
parent
commit
13ab5d6b41
No account linked to committer's email address
2 changed files with 3 additions and 2 deletions
  1. 2
    2
      README.md
  2. 1
    0
      js/WebView.ios.js

+ 2
- 2
README.md View File

@@ -33,7 +33,6 @@ class MyWebComponent extends Component {
33 33
   render () {
34 34
     return (
35 35
       <WebView
36
-        useWebKit // to use WKWebView -- will be default at some point
37 36
         src={{uri: "https://infinite.red/react-native"}}
38 37
         style={{marginTop: 20}}
39 38
       />
@@ -48,11 +47,12 @@ Additional properties are supported and will be added here; for now, refer to th
48 47
 
49 48
 ## Migrate from React Native core WebView to React Native WebView
50 49
 
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.
52 51
 
53 52
 ### Contributor Notes
54 53
 
55 54
 * 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
56 56
 
57 57
 ## Maintainers
58 58
 

+ 1
- 0
js/WebView.ios.js View File

@@ -126,6 +126,7 @@ class WebView extends React.Component {
126 126
   static NavigationType = NavigationType;
127 127
 
128 128
   static defaultProps = {
129
+    useWebKit: true,
129 130
     originWhitelist: WebViewShared.defaultOriginWhitelist,
130 131
   };
131 132