Skip to content

shenzhenjinma/react-native-webview-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

react-native-webview-bridge

An webview bridge for React Native.

npm install react-native-webviewbridge --save

usage

<WebViewBridge
	ref={webview => this.WebViewBridge = webview}
	onMessage={this.onMessage}
	autoHeight={true}//如果使用自动高度
	source={{uri:'http://youurl.com/aaa.html'}}
/>
//网页发送信息给rn(string类型)  window.postMessage("发送的信息内容")
//rn发送信息给网页(必须是js代码)  this.WebViewBridge.runjs("alert('h5会弹出一个弹出框')")

About

react-native-webview-bridge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published