react-native-webview

SVG loading issue in react native WebView (iOS)

时光怂恿深爱的人放手 提交于 2020-05-15 08:01:53
问题 Tools used D3 js: v4.11.0 react-native: v0.60.3 react-native-webview: v9.3.0 Previously I was using react-native 0.59.8 and I was using WebView from react-native, in this version WebView was working fine, SVG was also loading perfectly, but after upgrading react native to 0.60.3, I also have to take WebView from react-native-webview, React Native WebView :- <WebView scrollEnabled = {true} originWhitelist={["*"]} javaScriptEnabled={true} source={{ uri: isAndroid ? "file:///android_asset/widget

SVG loading issue in react native WebView (iOS)

霸气de小男生 提交于 2020-05-15 08:01:10
问题 Tools used D3 js: v4.11.0 react-native: v0.60.3 react-native-webview: v9.3.0 Previously I was using react-native 0.59.8 and I was using WebView from react-native, in this version WebView was working fine, SVG was also loading perfectly, but after upgrading react native to 0.60.3, I also have to take WebView from react-native-webview, React Native WebView :- <WebView scrollEnabled = {true} originWhitelist={["*"]} javaScriptEnabled={true} source={{ uri: isAndroid ? "file:///android_asset/widget

React Native and webview communication, how to call react function from RN?

耗尽温柔 提交于 2020-04-17 18:30:09
问题 I have RN <=> Webview running webview subscribe to 'getFoo' message webview sets foo value to 'woo' (with breakpoint I can confirm foo value has been updated) RN sends 'getFoo' message to webview : give me the value of foo webview gets notified of the request of the RN via callback, here foo value is empty! why? webview sends the foo value (empty) to RN Below is the webview part import _ from "lodash" import React, { useState, useContext, useEffect, useReducer, useCallback, useRef } from

How can I send a message from the WebView to React Native?

感情迁移 提交于 2019-12-11 17:23:29
问题 I’ve successfully managed to send a message from React Native (RN) to a WebView. What I’m struggling with, is getting the message back from the WebView to RN. There’s no errors showing - it’s just that the message never gets through. Here is the code which I’m using: React Native Code <WebView ref={webview => (this.webview = webview)} source={{ uri: "http://www.my-web-site"}} onLoadEnd={() => this.onLoadEnd()} onMessage={this.onMessage} cacheEnabled={false} originWhitelist={['*']}