Skip to content

Commit 86ce7bf

Browse files
author
Bernardo Amaral
committed
Updated webview import
1 parent 1c45360 commit 86ce7bf

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

App/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import {
44
StyleSheet,
55
Text,
66
View,
7-
WebView,
87
Image,
98
Dimensions
109
} from 'react-native';
10+
import { WebView } from 'react-native-webview';
1111

1212
const win = Dimensions.get('window');
1313
class ChartWeb extends Component {
@@ -60,7 +60,7 @@ class ChartWeb extends Component {
6060
}
6161

6262
// used to resize on orientation of display
63-
reRenderWebView(e) {
63+
reRenderWebView = (e) => {
6464
this.setState({
6565
height: e.nativeEvent.layout.height,
6666
width: e.nativeEvent.layout.width,

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@
2525
"bugs": {
2626
"url": "https://github.com/TradingPal/react-native-highcharts/issues"
2727
},
28-
"homepage": "https://github.com/TradingPal/react-native-highcharts#readme"
28+
"homepage": "https://github.com/TradingPal/react-native-highcharts#readme",
29+
"dependencies": {
30+
"react-native-webview": "^5.6.2"
31+
}
2932
}

react-native-highcharts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import {
44
StyleSheet,
55
Text,
66
View,
7-
WebView,
87
Image,
98
Dimensions
109
} from 'react-native';
10+
import { WebView } from 'react-native-webview';
1111

1212
const win = Dimensions.get('window');
1313
class ChartWeb extends Component {
@@ -60,7 +60,7 @@ class ChartWeb extends Component {
6060
}
6161

6262
// used to resize on orientation of display
63-
reRenderWebView(e) {
63+
reRenderWebView = (e) => {
6464
this.setState({
6565
height: e.nativeEvent.layout.height,
6666
width: e.nativeEvent.layout.width,

0 commit comments

Comments
 (0)