Как предоставить данные из React Native для WebView
// Web App
<button onClick={() => {
if(window.ReactNativeWebView) { // ensure window.ReactNativeWebView is there, otherwise, web app might crash if is not there
window.ReactNativeWebView.postMessage('Wayne is coming again')
}
}}>
</button>
// Native App
<WebView
onMessage={(event) => {
console.log(event.nativeEvent.data) // Client received data
}}
source={{ uri: 'https://your.domain.com' }}
/>
Dead Dormouse