From 86ce7bf7840175728f845d9ddd1d473be98369b1 Mon Sep 17 00:00:00 2001 From: Bernardo Amaral Date: Mon, 15 Apr 2019 11:48:07 +0100 Subject: [PATCH] Updated webview import --- App/index.js | 4 ++-- package.json | 5 ++++- react-native-highcharts.js | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) 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,