title: TabNavigator customize icon error in react-native
body: <p>I'm using <code>Xcode 10</code> &amp; latest <code>react-native</code> version.
  I created <code>StackNavigator</code> app with <code>TabNavigator</code>.</p>
  <p>Code: <code>navigation.js</code> Class</p>
  <pre><code>import React from &quot;react&quot;;
  import { TabNavigator, StyleSheet, Text, View, Image} from &quot;react-navigation&quot;;
  
  import Dashboard from '.././Screen/Dashboard'
  import Home from '.././Screen/Home'
  import Events from '.././Screen/Events'
  import Settings from '.././Screen/Settings'
  
  
  export default Tab = TabNavigator({
    Home: {
      screen: Home,
    },
    Settings: {
      screen: Settings,
      navigationOptions: {
            tabBarLabel: 'Settings',
            tabBarIcon: ({ tintColor }) =&gt; (
              &lt;Image source={require('.././assets/setting.png')}
              style= {{width:15, height:15, tintColor:'black'}}&gt;
              &lt;/Image&gt;
          )
      },
    },
    Events: {
      screen: Events,
      },
    }, {
    tabBarPosition: 'bottom',
    swipeEnabled: true,
    tabBarOptions: {
      showIcon: true,
      activeTintColor: '#f2f2f2',
      activeBackgroundColor: &quot;#2EC4B6&quot;,
      inactiveTintColor: '#666',
      labelStyle: {
        fontSize: 16,
        padding:4,
      }
    }
  });
  </code></pre>
  <p>But i got error here,</p>
  <blockquote>
  <p>[fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Invariant Violation: Invariant Violation: Invariant Violation: 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>
  </blockquote>
  <p>If i remove this line:</p>
  <pre><code>tabBarIcon: ({ tintColor }) =&gt; (
                  &lt;Image source={require('.././assets/setting.jpeg')}
                  style= {{width:15, height:15, tintColor:'black'}}&gt;
                  &lt;/Image&gt;
              )
  </code></pre>
  <p>then its working perfectly without icon.
  i searched everything but don't find solution.</p>