I tried establishing a default background color for all my headers, but it is not working.
I am using defaultNavigationOptions and it is not working.
const RootStack = createStackNavigator(
{
Home: HomeScreen,
Details: DetailsScreen
},
{
initialRouteName: "Home",
defaultNavigationOptions: {
headerStyle: {
backgroundColor: "#6B52AE"
},
headerTintColor: "#fff",
headerTitleStyle: {
fontWeight: "bold"
}
}
}
);
I am expecting a purple background, but when I reload the ios simulator, I get a white header instead.