alinz / react-native-tabbar

Tab bar with more freedom
MIT License
265 stars 49 forks source link

Trying to add unknown view tag: 8 #3

Closed mbrochh closed 8 years ago

mbrochh commented 8 years ago

I started playing around with this component but couldn't get it running on Android. Here is my render() function:

render: function() {
    var state = this.state;
    return (
      <Tabbar
        selected={state.selectedTab}
        onTabItemPress={this.onTabItemPress}
      >
        <Tabbar.Item name="shop">
          <Tabbar.Item.Content>
            <View style={{ flex: 1, backgroundColor: 'blue' }}>Asd</View>
          </Tabbar.Item.Content>
          <Tabbar.Item.Icon>
            <Text>Icon1</Text>
          </Tabbar.Item.Icon>
        </Tabbar.Item>
      </Tabbar>
    );
  },

When I try to run this, I get the red screen of death saying Trying to add unknown view tag: 8 detail: View tag:7

mbrochh commented 8 years ago

ARG! I should have put the view content Asd into a <Text></Text> component! It works now :)