Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Open a Webpage in React Native with Linking and WebView

    react-nativeReact Native

    There are two ways to open urls in React Native. One is to open, and switch to the device's web browser, and the other is to embed the web page within your application.

    To open the mobile device's web browser, we'll import Linking from react native, and use the openURL function, which will open any url that starts with http or https in that web browser.

    If you want to stay within your current application however, you can import WebView from react native, and use that as a component in your application. Pass in a uri param to display that web page in the embedded web view.