title: React Native - Header Title on Material Bottom Tabs on Navigation 5
body: <p>I have a Material Bottom Tabs into a Stack Navigator in Navigation 5.</p>
  
  <p>It is suppose dto get the title and route it throught a function but doesn't work.</p>
  
  <p>function:</p>
  
  <pre><code>function getHeaderTitle(route) {
    const routeName = route.state
      ? route.state.routes[route.state.index].name
      : route.params?.screen || 'Home';
  
    switch (routeName) {
      case 'Favorites':
        return 'Favorites';
      case 'Info':
        return 'Info';
    }
  }
  </code></pre>
  
  <p>materialBottomTabs</p>
  
  <pre><code>const NavTab = () =&gt; {
    return (
      &lt;Tab.Navigator&gt;
        &lt;Tab.Screen
          name="Favorites"
          component={FavoritesScreen}
          options={({route}) =&gt; ({
            tabBarLabel: 'Fav',
            tabBarIcon: () =&gt; IconFav(),
          })}
        /&gt;
        &lt;Tab.Screen
          name="Info"
          component={InfoScreen}
          options={({route}) =&gt; ({
            headerTitle: 'Info',
            tabBarLabel: 'Info',
            tabBarIcon: () =&gt; IconInfo(),
          })}
        /&gt;
      &lt;/Tab.Navigator&gt;
  </code></pre>
  
  <p>stackNavigator</p>
  
  <pre><code>&lt;NavigationContainer&gt;
   &lt;Stack.Navigator&gt;
      &lt;Stack.Screen
        name="Home"
        component={NavTab}
        options={({route}) =&gt; ({
          headerTitle: getHeaderTitle(route),    
        })}
      /&gt;
      &lt;Stack.Screen
        name="Detail"
        component={ItemDetailScreen}
      /&gt;
    &lt;/Stack.Navigator&gt;
  &lt;/NavigationContainer&gt;;
  </code></pre>
  
  <p>I easly set the title of a screen listed in the Stack.
  Example:</p>
  
  <pre><code>const ItemDetailScreen = ({route, navigation}) =&gt; {
  
    useEffect(() =&gt; {
      navigation.setOptions({
        headerTitle: item.title,
      });
    }, []);
  </code></pre>
  
  <p>But I can't set the title of the screens into the material bottom tabs. They always have the name set into the stack navigator. How can I do it?</p>