Skip to content

Commit

Permalink
Merge pull request #3 from react-native-community/webkit-default
Browse files Browse the repository at this point in the history
Defaults to WKWebView instead of UIWebView
  • Loading branch information
jamonholmgren authored Sep 10, 2018
2 parents 14b2f8a + 236e613 commit 13ab5d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
/>
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions js/WebView.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class WebView extends React.Component {
static NavigationType = NavigationType;

static defaultProps = {
useWebKit: true,
originWhitelist: WebViewShared.defaultOriginWhitelist,
};

Expand Down

0 comments on commit 13ab5d6

Please sign in to comment.