Questions tagged [react-native-webview]
406 questions
0
votes
1 answer
What is the solid way to find out whether the User in on a webview or a browser in reactjs
What is the most solid way to check whether a user is on a webview inside a App or another web browser?
We can get details of the OS running using javascript window.navigator.userAgent, but is there a way to specifically identify whether user is…

Ishara Abeykoon
- 540
- 1
- 6
- 24
0
votes
1 answer
React Native WebView goBack loses parameters - Android
I am having an issue with the React Native WebViews goBack/goForward functions working as expected on Android. From a high level, here is the basics of my use case:
I have a RN app with a list of components that when tapped open a new screen with a…

drquiz
- 161
- 2
- 6
0
votes
2 answers
react-native-webview this.webView.postMessage not working
The previous version does not work as it is new.
"react-native-webview": "^9.0.2"
"react-native": "0.62.0",
2. webview…

YOUDEV
- 1
- 1
- 1
0
votes
1 answer
React Native and webview communication, how to call react function from RN?
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…

eugene
- 39,839
- 68
- 255
- 489
0
votes
1 answer
react native webview postmessage doesn't trigger onmessage
React Native Version : 0.60
Library used : react-native-webview (version : 9.0.1)
Issue :
When I send postMessage (this.webView.postMessage('somedata')) from my react-native event handler to webview, the onMessage is not triggered. But onMessage…

user3055126
- 249
- 3
- 12
0
votes
2 answers
How to enable pop up in Web View?
Currently using "react-native-webview": "^6.11.1" in application. While loading a website, there's a pop up which need to be approved. How can I enable/allow webview to display the pop up?
Tried on a few things:
Setting prop useWebKit to TRUE…

Tommy Leong
- 2,509
- 6
- 30
- 54
0
votes
0 answers
React Native WebView use external JavaScript file for injectedJavscript
So the problem seems pretty simple. I want to import an external JS file, convert it to a string and use it for injectedJavascript in WebView.
For example I tried:
…

TheE
- 328
- 4
- 13
0
votes
1 answer
Position: fixed in React native Webview behaves inconsistently on iOS and Android
I am trying to display code generated SVGs using a Webview. The following component behaves as I need to on Android, but the svg won't fit the webview on iOS/
import * as React from "react";
import { View } from "react-native";
import WebView from…

Ryan Pergent
- 4,432
- 3
- 36
- 78
0
votes
0 answers
How to fix "Can't find variable: require" within Expo webview app
I am trying to make an app with two sections. One section is the react cod. The second section is using webpack to bundle that into an html file that I can then load using react-native-web-view.
webpack.config.js:
const HtmlWebPackPlugin =…

KieranLewin
- 1,780
- 2
- 7
- 13
0
votes
1 answer
what does "this" mean in WebView component at props "ref" in react native webview
i try to injectJavaScript in react native web view like bellow work well
setTimeout(() => {
this.webref.injectJavaScript(someJSCODE);
}, 3000);
this.webref = r}
source={{uri: 'https://accounts.google.com/'}}
/>
but if i call…

vy.pham
- 571
- 6
- 20
0
votes
1 answer
Webview not receiving post message data from web
I am loading a Vue web app under react native web view. once i click on a button in web view. it needs to get detected in react native . is there any possibilities for that
?

Pragadish Waran
- 13
- 4
0
votes
1 answer
EventListener in react native webview
I am trying to get a scroll event back to react from a webview.
According to the doc it seems that the way to go is using postMessage and injectedJavascript.
Here is my code

Mel
- 625
- 9
- 25
0
votes
0 answers
Post request returns the webpage authenticated but webview still shows the login webpage
I'm new in React Native and I'm having an issue with react-native-webview after doing a post request.
On my app, a user logs in with a client number and a password that I store in SQLite because I'll use this data. When a user touches in an option…
0
votes
1 answer
React Native Webview: Browser not supported
I'm playing around with react-native-webview, and when I tried to add this URL (https://maps.flydenver.com/) I received this error:
Is there a way to fix this?
import { WebView } from 'react-native-webview';
render() {
return (
…

Alberto Ramos
- 105
- 3
- 13
0
votes
1 answer
Loading Static HTML content and adding baseUrl to it, using react-native-webview. returns unexpected url on click
I am using react-native-webview. I am adding static HTML content into it, with baseUrl for relative path.
{
console.log(navState);
}}
/>
on Clicking a link there in Webview, getting the below log:
{
canGoForward: false,…

Shahid Anjum
- 148
- 1
- 5