title: Check the render method of `TabBarIcon`
body: <p>I wanna add icons in the bottom Tab Navigation and facing the above error.
  if I am using this code without icons then everything is fine I mean Tab Bar work properly.</p>
  <p>complete error is:
  Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.</p>
  <p>Check the render method of <code>TabBarIcon</code>.</p>
  <p>My Code is</p>
  <pre><code>import React, { Component } from 'react';
  import {StyleSheet, View, Text,} from 'react-native';
  import {NavigationContainer, StackActions} from '@react-navigation/native';
  import {createStackNavigator} from '@react-navigation/stack';
  import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
  import {Ionicons} from 'react-native-vector-icons/Ionicons';
  import Home from './Pages/Home';
  import Category from './Pages/Category';
  const Tab = createBottomTabNavigator();
  export default function App(){
    return(
      &lt;NavigationContainer&gt;
        &lt;Tab.Navigator initialRouteName=&quot;Home&quot;
        screenOptions={ props=&gt; ({
          tabBarIcon: ({ focused, color, size }) =&gt; {
            let iconName;
            if(props.route.name === &quot;Home&quot;){
              iconName = focused
              ? &quot;ios-information-circle&quot;
              : &quot;ios-information-circle-outline&quot;;
            }
            if(props.route.name === &quot;Category&quot;){
              iconName = focused
              ? &quot;ios-information-circle&quot;
              : &quot;ios-information-circle-outline&quot;;
            }
            return &lt;Ionicons name={iconName} color={color} size={size} /&gt;;},}) }&gt;
  &lt;Tab.Screen 
        name=&quot;Home&quot; component={Home}&gt;&lt;/Tab.Screen&gt;
        &lt;Tab.Screen name=&quot;Category&quot; component={Category}&gt;&lt;/Tab.Screen&gt;
        &lt;/Tab.Navigator&gt;
      &lt;/NavigationContainer&gt;
  )}
  </code></pre>