Skip to content

Instantly share code, notes, and snippets.

@ThrowJojo
Created March 9, 2018 00:25
Show Gist options
  • Save ThrowJojo/42486a2cccd18ea097e9b902a5ad339d to your computer and use it in GitHub Desktop.
Save ThrowJojo/42486a2cccd18ea097e9b902a5ad339d to your computer and use it in GitHub Desktop.
Opening a link in React Native
// Opens a link
static async openURL(url: string): Promise<void> {
try {
await Linking.openURL(url);
} catch (error) {
console.log(error);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment