Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Already added three tab items but still returns an Error: "Error: Three tab should be work" #5

Closed
hotmarycorleone opened this issue Nov 14, 2018 · 1 comment

Comments

@hotmarycorleone
Copy link

import React, { Component } from 'react';
import {View} from 'react-native';
import { Container, Header, Content, Card, CardItem, Text, Body } from 'native-base';
import TabBar from "react-native-tab-bar-interaction";

export default class App extends Component {
render() {
return (

        <TabBar.Item
         icon={require('./images/jeepney.png')}
         selectedIcon={require('./images/noimage.png')}
         title="Tab1"
         screenBackgroundColor={{ backgroundColor: '#008080' }}
     >
        
      Tab First
        
        </TabBar.Item>

        <TabBar.Item
         icon={require('./images/parking.png')}
         selectedIcon={require('./images/noimage.png')}
         title="Tab2"
         screenBackgroundColor={{ backgroundColor: '#F08080' }}
     >
        
        Tab Second
        
        </TabBar.Item>

        <TabBar.Item
         icon={require('./images/shuttle.png')}
         selectedIcon={require('./images/noimage.png')}
         title="Tab3"
         screenBackgroundColor={{ backgroundColor: '#485d72' }}
     >
         
         Tab Third
         
         </TabBar.Item>

         

);

}
}

@hotmarycorleone hotmarycorleone changed the title Added three tab items but still returns Error: Three tab should be work Already added three tab items but still returns an Error: "Error: Three tab should be work" Nov 14, 2018
@Miladvp
Copy link

Miladvp commented Feb 7, 2019

Hi
you forgot to write your three tabs in TabBar

import TabBar from 'react-native-tab-bar-interaction';
class example extends Component{
    render( ) {
      return ( 
           <TabBar>
               <TabBar.Item><tabBar.Item/>
               <TabBar.Item><tabBar.Item/>
               <TabBar.Item><tabBar.Item/>
          <TabBar/>
      )
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants