react-native-highcharts icon indicating copy to clipboard operation
react-native-highcharts copied to clipboard

WebView has been removed from React Native.

Open nwilcox9 opened this issue 6 years ago • 4 comments

I recently upgraded from React Native v59 to v61. Now I get this error when I try to use ChartView:

Invariant Violation: WebView has been removed from React Native. It can now be installed and imported from 'react-native-webview' instead of 'react-native'. See https://github.com/react-native-community/react-native-webview

I had noticed the warnings before I upgraded (mentioned here). I'm going to change the import in my code, but hope this can get fixed eventually!

nwilcox9 avatar Oct 31 '19 20:10 nwilcox9

I made the following edits to react-native-highcharts.js to make it work:

import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    // WebView,
    Image,
    Dimensions
} from 'react-native';

// add
import { WebView } from 'react-native-webview';

and

    render() {
    ...
              <WebView
                  // onLayout={this.reRenderWebView}
                  onLayout={this.reRenderWebView.bind(this)}
    ...
    };

nwilcox9 avatar Oct 31 '19 20:10 nwilcox9

Can the maintainers update this library with the above change?

abadfish avatar Apr 13 '20 19:04 abadfish

For anyone who has this issue (@abadfish, @nwilcox9 etc) maintainers don't seem to be around anymore. I've rewritten this library (which happened to be a mess) which I will be actively maintaining and I will be working on further optimisations/new features. Feel free to check it out here. I've made sure the API is the same so should just be a question of installing react-native-highcharts-wrapper and updating the import (adding -wrapper).

socrypto avatar Apr 14 '20 00:04 socrypto

It looks like the highcharts team released this repo https://github.com/highcharts/highcharts-react-native

guy-shahine avatar Jul 30 '20 00:07 guy-shahine