diff --git a/App/index.js b/App/index.js index 6a57b9f..f1e6f02 100644 --- a/App/index.js +++ b/App/index.js @@ -4,10 +4,10 @@ import { StyleSheet, Text, View, - WebView, Image, Dimensions } from 'react-native'; +import { WebView } from 'react-native-webview'; const win = Dimensions.get('window'); class ChartWeb extends Component { @@ -60,7 +60,7 @@ class ChartWeb extends Component { } // used to resize on orientation of display - reRenderWebView(e) { + reRenderWebView = (e) => { this.setState({ height: e.nativeEvent.layout.height, width: e.nativeEvent.layout.width, diff --git a/package.json b/package.json index 63fcfc9..ff3a18f 100644 --- a/package.json +++ b/package.json @@ -25,5 +25,8 @@ "bugs": { "url": "https://github.com/TradingPal/react-native-highcharts/issues" }, - "homepage": "https://github.com/TradingPal/react-native-highcharts#readme" + "homepage": "https://github.com/TradingPal/react-native-highcharts#readme", + "dependencies": { + "react-native-webview": "^5.6.2" + } } diff --git a/react-native-highcharts.js b/react-native-highcharts.js index 6a57b9f..f1e6f02 100644 --- a/react-native-highcharts.js +++ b/react-native-highcharts.js @@ -4,10 +4,10 @@ import { StyleSheet, Text, View, - WebView, Image, Dimensions } from 'react-native'; +import { WebView } from 'react-native-webview'; const win = Dimensions.get('window'); class ChartWeb extends Component { @@ -60,7 +60,7 @@ class ChartWeb extends Component { } // used to resize on orientation of display - reRenderWebView(e) { + reRenderWebView = (e) => { this.setState({ height: e.nativeEvent.layout.height, width: e.nativeEvent.layout.width,