i have several screens in stack navigator like below
<Stack.Navigator screenOptions={TransitionScreenOptions}>
<Stack.Screen
options={stackoptions}
name="videoScreen"
component={videoScreen}
/>
<Stack.Screen
options={stackoptions}
name="registerScreen"
component={SignUpScreen}
/>
</Stack.Navigator>
for all the screens i set options like below
const stackoptions = ({ navigation }) => ({
headerBackTitleVisible: false,
headerStyle: {
backgroundColor: "#000",
},
headerTintColor: "#fff",
headerRight: () => {
return (
<Pressable
style={{ paddingRight: 8 }}
onPress={() => navigation.toggleDrawer()}
>
<AntDesign name="menu-fold" size={30} color="white" />
</Pressable>
);
},
});
Now , how can i override or add certain options to one of my screen , for example something like below , I want to modify only headerTintColor , whereas remaining stackoptions should be used except headerTintColor.
<Stack.Screen
options={...stackoptions, headerTitle: "" }
name="registerScreen"
component={SignUpScreen}
/>