Hide header in a single screen
<Stack.Screen name='Home' component={HomeScreen} options={{headerShown: false}}/>
<Stack.Navigator
screenOptions={{
headerShown: false
}}
>
<Stack.Screen name="route-name" component={ScreenComponent} />
</Stack.Navigator>
<Stack.Navigator
screenOptions={{
headerShown: false
}}
>
<Stack.Screen name="route-name" component={ScreenComponent} />
</Stack.Navigator>
<Stack.Screen options={{headerShown: false}} name="route-name" component={ScreenComponent} />
<Stack.Screen
name="Home"
component={HomeScreen}
options={{ title: null}}
/>
// hide header in multiple screens
<Stack.Navigator
screenOptions={{
headerShown: false
}}
>
<Stack.Screen name="route-name" component={ScreenComponent} />
</Stack.Navigator>