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

关于webview的问题?WebView has been removed from React Native.

Open Dyrixu opened this issue 3 years ago • 4 comments

WebView has been removed from React Native.

Dyrixu avatar Aug 16 '21 03:08 Dyrixu

WebView has been removed from React Native.

关于webview版本的问题,作者是否可以更新优化一下呢?

Dyrixu avatar Aug 16 '21 03:08 Dyrixu

这个库作者已经好久不维护了,应该是放弃了。

我这里有两个解决方案。

一个是换另一个库https://github.com/supervons/react-native-echarts-pro ,作者是基于这个库重构的。

继续使用这个库的话,可以修改node_modules目录下,native-echarts目录中的源码。把所有从"react-native"导入的"WebView"组件换成import WebView from 'react-native-webview';,从"react-native-webview"中导入。

congshengwu avatar Sep 23 '21 03:09 congshengwu

RN新版0.57起,native-echarts里面的WebView可以添加useWebKit={true}属性来指定使用WKWebView

zhengyanGit avatar Oct 29 '21 02:10 zhengyanGit

dont use this package , depricated !!

use it npm i react-native-echarts-pro now

for the solution of this question go through this path edit file .\node_modules\native-echarts\src\components\Echarts\index.js

import { WebView, View, StyleSheet, Platform } from 'react-native';

to=> import {View, StyleSheet, Platform } from 'react-native'; import {WebView} from 'react-native-webview';

issue solved

KrushnaNaghate avatar Mar 03 '23 08:03 KrushnaNaghate