Skip to content

Instantly share code, notes, and snippets.

@fabiancarlos
Created March 14, 2017 21:54
Show Gist options
  • Save fabiancarlos/8f1628bcd72ab5b97ee320e245ba6f97 to your computer and use it in GitHub Desktop.
Save fabiancarlos/8f1628bcd72ab5b97ee320e245ba6f97 to your computer and use it in GitHub Desktop.
REact native webview.js
_openModal(){
console.log("OPEN WEB VIEW");
this.setState({modalVisible: !this.state.modalVisible});
}
.... render ...
<Modal
animationType={"slide"}
transparent={false}
visible={this.state.modalVisible}
onRequestClose={() => {alert("Modal has been closed.")}}
>
<View style={{marginTop: 22, flex: 1}}>
<Text>TESTE</Text>
<WebView
source={{uri: `https://github.com/facebook/react-native?long${this.state.long}`}}
style={{marginTop: 20, backgroundColor: 'red'}}
/>
</View>
</Modal>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment