Q: How do I find the specifications for the "renderIcon" function used in the React Navigation TabBarIcon/TabBar elements? This function is used but I just can't find where it's defined.
I also see a lot of tutorials using this code - so I'm not sure how people are understanding how this is being used. 
I pulled this from the source code:
 20 export default function TabBarIcon({
 21   activeOpacity,
 22   inactiveOpacity,
 23   activeTintColor,
 24   inactiveTintColor,
 25   renderIcon,    <----  HERE IT IS BEING USED IN THE REACT NAVIGATION SOURCE CODE
 26   size,
 27   style,
 28 }: Props) {
 29   // We render the icon twice at the same position on top of each other:
 30   // active and inactive one, so we can fade between them.
 31   return (
 32     <View style={style}>
 33       <View style={[styles.icon, { opacity: activeOpacity }]}>
 34         {renderIcon({
 35           focused: true,
 36           size,
 37           color: activeTintColor,
 38         })}
 39       </View>
 40       <View style={[styles.icon, { opacity: inactiveOpacity }]}>
 41         {renderIcon({
 42           focused: false,
 43           size,
 44           color: inactiveTintColor,
 45         })}
 46       </View>
 47     </View>
 48   );
 49 }

Can't find where this method comes from only that it's used. There is no mention of this method anywhere in the documentation - that I can find. 
What am I missing?

A: You can use Navigation Actions to achieve the same behavior. I wrote up a short blog explaining why we couldn't just use conditional templates as mentioned in the upgrade guide
https://omidborjian.medium.com/switch-navigator-in-react-navigation-5-1d2bf34775b9
import { CommonActions } from '@react-navigation/native';

       navigation.dispatch(

            CommonActions.reset({
              index: 1,
              routes: [
                { name: routeName, params: params }
              ],
            })
          );

