Skip to content

Instantly share code, notes, and snippets.

@ericjames
Created May 21, 2018 19:03
Show Gist options
  • Save ericjames/a79321d1880f3ae6aa411aafa86426ca to your computer and use it in GitHub Desktop.
Save ericjames/a79321d1880f3ae6aa411aafa86426ca to your computer and use it in GitHub Desktop.
React-Native WebView Example
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