how to remove header in react navigation code example

Example 1: how to remove name in react navigation header

<Stack.Navigator
  screenOptions={{
    headerShown: false
  }}
>
  <Stack.Screen name="route-name" component={ScreenComponent} />
</Stack.Navigator>

Example 2: how to hide header in react navigation

<Stack.Navigator
  screenOptions={{
    headerShown: false
  }}
>
  <Stack.Screen name="route-name" component={ScreenComponent} />
</Stack.Navigator>

Example 3: remove header from certain pages react navigation

<Stack.Screen
	name="Home"
	component={Home}
	options={{header: () => null}}
/>

Example 4: how to hide title bar react-navigation

<Root.Screen options={{headerShown: false}}/>