oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.45k stars 2.12k forks source link

Warning in console for Icon.TabBarItem #19

Closed zachguo closed 9 years ago

zachguo commented 9 years ago

I got warning in console but everything in simulator works fine.

Warning: Failed propType: Invalid prop `icon` of type `string` supplied to `RCTTabBarItem`, expected `object`.

My codes:

var Icon = require('react-native-vector-icons/FontAwesome');

...
        <Icon.TabBarItem
          iconName='bar-chart'
          title='DASHBOARD'
          iconSize={24}
          selected={this.state.selectedTab === 'DASHBOARD'}
          onPress={() => {
            this.setState({
              selectedTab: 'DASHBOARD',
            });
          }}>
          <Dashboard />
        </Icon.TabBarItem>
...

Do I miss anything?

oblador commented 9 years ago

It's just React Native being retarded (as of 0.9 IIRC) :-) Hopefully fixed in 0.10 final release (although no indication of that right now), just ignore it for now.

oblador commented 9 years ago

Can no longer reproduce this on 0.11 RC.