Skip to content
Advertisement

How can I send a data to webview by clicking on react native button

I have used the componentDidMount method which sending data properly to webview but i want to send data webview when I click on particular react native button.

In this webview is displaying the local html page and in this I’m sending the data to webview and on load event in html page alert the data which sent by react native in this componentdidmount method is succesfully sending data to webview html page but when I’m trying same code in method which saying that this.input is undefined.

JavaScript

Advertisement

Answer

In short

Sending Data from Native(Webview) to Web App

JavaScript

Sending data from Web App to Native(Webview)

JavaScript

Full Example React Native Code

JavaScript

Web App

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement