import React, { Component } from 'react'
import {View } from "react-native"
/*
import {WebView} from "react-native" -- 當前最新版本已不支持
react-native 0.6之後版本已從react-native移除WebView組件,
按文檔上步驟發現需要安裝依賴項: react-native-webview及react-native-get-random-values
npm i react-native-webview
npm i react-native-get-random-values
或
yarn add react-native-webview
yarn add react-native-get-random-values
*/
import 'react-native-get-random-values';
import { WebView } from "react-native-webview"
export default class App9 extends Component {
render() {
return (
<WebView source={{uri: "https://m.jd.com/"}}></WebView>
)
}
}
關於react-native報錯: Invariant Violation: WebView has been removed from React Native. It can ....
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.