TabView with React Native
npm install mkp-react-native-tab-view




React Native TabView
bash
$ npm install mkp-react-native-tab-view --save
`Support
IOS/AndroidQuick Start
`javascript
style={{flex:1}}
tabs={[{
text:"tab1",
onPress:()=>{},
component:
},{
text:"tab2",
component: ,
onHide:(tab,index)=>{
console.log(tab${index} will be hidden);
}
},{
text:"tab3",
component:
Tab3
}]}
renderTabBar={(isActive,tab)=>{
console.log("render tab bar")
if(isActive){
return {tab.text}
}
return {tab.text}
}}>
`
TabView Props
tabs:object[]
This property is used to configure tab bar . you must provide a array , children can be any object. but some one is defined ,please see it following,
`javascript
// type tab
type tab={
//tab content
component:Element,
//invoke when tab bar click
onPress:Function,
//invoke when tab content will be hidden
onHide:Function,
//any custom parameter
...otherParameter
};
``