Skip to content

Instantly share code, notes, and snippets.

@aloukissas
Created January 31, 2019 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aloukissas/47f5d7209a6f21f669d178335eae103f to your computer and use it in GitHub Desktop.
Save aloukissas/47f5d7209a6f21f669d178335eae103f to your computer and use it in GitHub Desktop.
import React from "react";
import { Text, View } from "react-native";
import { WebBrowser } from "expo";
class LinkingDemoModal extends React.Component {
handleOpenUrl = url => {
WebBrowser.openBrowserAsync(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