React Native open website URL in default browser iOS Android Example

The Linking library is used in react native for deep linking process. Using the Linking library we can open or navigate to any website URL from our Android-iOS app to device default web browser. So in this tutorial we would going to open website URL in default browser on button click in iOS Android application Example tutorial.

Contents in this project open website URL in default browser iOS Android react native app Example:

1. Import StyleSheet, View, Button and Linking component in your project.

2. Create a Root view in render’s return block.

3. Create a Button component in View and call the Linking.openURL() function on Button onPress event. We would call this using Self Fat Arrow Function.

4. Create Style for View.

5. Complete source code for App.js File :

Screenshot in Android device :

open website URL in default browserScreenshot in iOS device :

Leave a Reply

Your email address will not be published. Required fields are marked *