Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebView has been removed from React Native. #112

Open
nwilcox9 opened this issue Oct 31, 2019 · 4 comments
Open

WebView has been removed from React Native. #112

nwilcox9 opened this issue Oct 31, 2019 · 4 comments

Comments

@nwilcox9
Copy link

nwilcox9 commented Oct 31, 2019

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
Copy link
Author

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)}
    ...
    };

@abadfish
Copy link

Can the maintainers update this library with the above change?

@socrypto
Copy link

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).

@guy-shahine
Copy link

guy-shahine commented Jul 30, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants