前提・実現したいこと
react native+expoの環境でwebviewを使用したい
疑問点
https://facebook.github.io/react-native/docs/webview
上記ページの上部にwarningとあり翻訳機にかけると
今後はreact-native-webviewを使用するようにとあります。
https://github.com/react-native-community/react-native-webview/blob/master/docs/Getting-Started.md
そこで上記ページを参考に設定をしてみましたがエラーとなります。
App.js
1 2import React, { Component } from 'react'; 3import { WebView } from 'react-native-webview'; 4 5export default class MyWeb extends Component {//export defaultを追記しました。 6 render() { 7 return ( 8 <WebView 9 source={{uri: 'https://infinite.red'}} 10 style={{marginTop: 20}} 11 /> 12 ); 13 } 14} 15
error.log
1 2Invariant Violation: requireNativeComponent: "RNCWKWebView" was not found in the UIManager. 3
githubのissueを追っていくと以下の記述がありました。
https://github.com/react-native-community/react-native-webview/issues/140#issuecomment-462270927
質問
【1】20190511時点でexpoを使用してwebViewを実現する場合
react-nativeコアのwebviewで実装するしかないのでしょうか。
【2】コアのwebviewは翻訳機にかけると削除予定と出ますがこれはいつくらいというのはどこかに書いてありますか?
【3】https://github.com/expo/expo/pull/3748
https://github.com/expo/expo/issues/3381
この辺りを見るとexpoにも今月か来月react-native-webviewが
入りそうという感じがしましたが認識としてあっていそうでしょうか。
###備考
react-nativeコアのwebviewは使えました。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/05/17 09:52