alinz / react-native-tabbar

Tab bar with more freedom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to add unknown view tag: 8

mbrochh opened this issue · comments

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

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