- Notifications
You must be signed in to change notification settings - Fork3
Provides the ability to perform React Native calls from the WebView
License
NotificationsYou must be signed in to change notification settings
Intellicode/react-native-bridgeable-webview
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A<WebView>
component replacement for react-native
Requires react-native == 0.6
- Run
npm install react-native-bridgeable-webview --save
- Open your project in XCode, right click on
Libraries
and clickAdd Files to "Your Project Name"
- Add
libRNBridgeableWebview.a
toBuild Phases -> Link Binary With Libraries
.
- Whenever you want to use it within React code now you can:
var WebView = require('react-native-bridgeable-webview');
var WebView = require('react-native-bridgeable-webview');
It is the exact same component asWebView
except it offers a custom url scheme that acts as message bridge and a methodonWebViewMessageSent
to respond to calls made from the webview.
In your react-native code you can include the following snippet as aWebView
replacement:
<WebViewref={WEBVIEW_REF}automaticallyAdjustContentInsets={false}style={styles.webView}url={this.state.url}javaScriptEnabledAndroid={true}onNavigationStateChange={this.onNavigationStateChange}onWebViewMessageSent={this.onWebViewMessageSent}startInLoadingState={true}/>
About
Provides the ability to perform React Native calls from the WebView
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.