The navigation header
The navigation bars that you've created so far in this chapter have been sort of plain. That's because you haven't configured them to do anything, so react-navigation
will just render a plain bar with a back button. Each screen component that you create can configure specific navigation header content.
Let's build on the example discussed in the Route parameters section, which used buttons to navigate to a details page:
- The
App
component has major updates, so let's take a look at it:import { Button } from "react-native"; import { NavigationContainer } from "@react-navigation/native"; import { createNativeStackNavigator } from "@react-navigation/native-stack"; import Home from "./Home"; import Details from "./Details"; const Stack = createNativeStackNavigator(); export default function App() { return ( <NavigationContainer...