2.0.1 • Published 7 years ago
rn-tabs v2.0.1
React native tabs
Simple and easy to use tab-bar navigation for react-native.
Usage
import React, { Component } from 'react';
import { AppRegistry, View, Text } from 'react-native';
import { TabNavigation } from 'rn-tabs';
const HomeTab = () => (
<View>
<Text>Home Tab</Text>
</View>
);
const SettingsTab = () => (
<View>
<Text>Settings Tab</Text>
</View>
);
export default class App extends Component {
render() {
renturn (
<TabNavigation default="home" tabs={[
{ id: 'home', icon: 'ios-home', label: 'home', content: <HomeTab />},
{ id: 'home', icon: 'ios-cog', label: 'settings', content: <SettingsTab />}
]} />
);
}
}
AppRegistry.registerComponent('App', () => App);
Result: