Created
May 21, 2018 19:03
-
-
Save ericjames/a79321d1880f3ae6aa411aafa86426ca to your computer and use it in GitHub Desktop.
React-Native WebView Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.setState({ | |
webViewUri: "https://transitscreen.com/termsofuse", | |
webViewDisplay: "flex" | |
}); | |
<WebView | |
source={{uri:this.state.webViewUri}} | |
style={{height:400, width: 380, flex: 2, display: this.state.webViewDisplay}} | |
onError={console.error.bind(console, 'error')} | |
bounces={false} | |
onShouldStartLoadWithRequest={() => true} | |
javaScriptEnabledAndroid={true} | |
startInLoadingState={false} | |
// onLoad={(res) => this.onLoad(res)} | |
// onNavigationStateChange={(res) => this.onLoad(res)} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment