Created
January 31, 2019 00:33
-
-
Save aloukissas/2514dd037ad2daa11155b734e6f08fde to your computer and use it in GitHub Desktop.
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
import React from "react"; | |
import { Linking, Text, View } from "react-native"; | |
class LinkingDemo extends React.Component { | |
handleOpenUrl = url => { | |
Linking.openURL(url); | |
} | |
render() { | |
return ( | |
<View | |
style={{ | |
flex: 1, | |
justifyContent: "center", | |
alignItems: "center" | |
}} | |
> | |
<Text onPress={() => this.handleOpenUrl("https://chck.app")}> | |
Go to website | |
</Text> | |
</View> | |
); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment