Navigation
const MainNavigator = () => {
const isDark = useColorScheme() === "dark";
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen
name="Home"
component={HomeScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Details"
component={DetailsScreen}
options={{
headerStyle: {
backgroundColor: isDark ? Colors.darker : Colors.white,
},
headerTitleStyle: {
color: isDark ? Colors.white : Colors.black,
},
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
};Last updated