For many applications, it's required that external links can be visited and displayed within the app. This can be for showing a third-party website, online help, and the terms and conditions of using your app, among other things.
In this recipe, we will see how to open a WebView by clicking on a button in our app and dynamically setting the URL value. We'll also be using the react-navigation package for creating basic stack navigation in this recipe. Please check out the Setting up and using navigation recipe in Chapter 3, Implementing Complex User Interfaces – Part I for a deeper dive into building navigation.
If the needs of your app are better met by loading external websites via the device's browser, see the next recipe, Linking to websites and other applications.