Mindinventory / react-native-tabbar-interaction

Tabbar Component For React-Native
https://www.mindinventory.com/react-native-app-development.php
MIT License
819 stars 171 forks source link

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

Closed hotmarycorleone closed 5 years ago

hotmarycorleone commented 6 years ago

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 (

                        Tab First                                             Tab Second                                               Tab Third                              
);

} }

Miladvp commented 5 years ago

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/>
      )
  }
}