|
@@ -1,9 +1,11 @@
|
1
|
1
|
# React Native WebView - a Modern, Cross-Platform WebView for React Native
|
2
|
|
-[![star this repo](http://githubbadges.com/star.svg?user=react-native-community&repo=react-native-webview&style=flat)](https://github.com/react-native-community/react-native-webview) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors) [![Known Vulnerabilities](https://snyk.io/test/github/react-native-community/react-native-webview/badge.svg?style=flat-square)](https://snyk.io/test/github/react-native-community/react-native-webview)
|
|
2
|
+
|
|
3
|
+[![star this repo](http://githubbadges.com/star.svg?user=react-native-community&repo=react-native-webview&style=flat)](https://github.com/react-native-community/react-native-webview) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors) [![Known Vulnerabilities](https://snyk.io/test/github/react-native-community/react-native-webview/badge.svg?style=flat-square)](https://snyk.io/test/github/react-native-community/react-native-webview)
|
3
|
4
|
|
4
|
5
|
**React Native WebView** is a modern, well-supported, and cross-platform WebView for React Native. It is intended to be a replacement for the built-in WebView (which will be [removed from core](https://github.com/react-native-community/discussions-and-proposals/pull/3)).
|
5
|
6
|
|
6
|
7
|
## Core Maintainers - Sponsoring companies
|
|
8
|
+
|
7
|
9
|
_This project is maintained for free by these people using both their free time and their company work time._
|
8
|
10
|
|
9
|
11
|
- [Thibault Malbranche](https://github.com/Titozzz) ([Twitter @titozzz](https://twitter.com/titozzz)) from [Brigad](https://brigad.co/about)
|
|
@@ -43,17 +45,15 @@ This project follows [semantic versioning](https://semver.org/). We do not hesit
|
43
|
45
|
Import the `WebView` component from `react-native-webview` and use it like so:
|
44
|
46
|
|
45
|
47
|
```jsx
|
46
|
|
-import React, { Component } from "react";
|
47
|
|
-import { StyleSheet, Text, View } from "react-native";
|
48
|
|
-import { WebView } from "react-native-webview";
|
|
48
|
+import React, { Component } from 'react';
|
|
49
|
+import { StyleSheet, Text, View } from 'react-native';
|
|
50
|
+import { WebView } from 'react-native-webview';
|
49
|
51
|
|
50
|
52
|
// ...
|
51
|
53
|
class MyWebComponent extends Component {
|
52
|
54
|
render() {
|
53
|
55
|
return (
|
54
|
|
- <WebView
|
55
|
|
- source={{ uri: "https://facebook.github.io/react-native/" }}
|
56
|
|
- />
|
|
56
|
+ <WebView source={{ uri: 'https://facebook.github.io/react-native/' }} />
|
57
|
57
|
);
|
58
|
58
|
}
|
59
|
59
|
}
|
|
@@ -64,7 +64,6 @@ For more, read the [API Reference](./docs/Reference.md) and [Guide](./docs/Guide
|
64
|
64
|
## Common issues
|
65
|
65
|
|
66
|
66
|
- If you're getting `Invariant Violation: Native component for "RNCWKWebView does not exist"` it likely means you forgot to run `react-native link` or there was some error with the linking process
|
67
|
|
-- There's a [problem](https://stackoverflow.com/questions/52872045/rendering-webview-on-android-device-overlaps-previous-siblings-from-same-parent) on some Android devices where the webview could overlap previous siblings from same parent. To fix this, wrap the WebView in a View with style `overflow: hidden`.
|
68
|
67
|
|
69
|
68
|
## Contributing
|
70
|
69
|
|