import React, { Component } from “react”; import List from “./List”; import { createTabNavigator } from “react-navigation”; const Good = () => { return <List tab=“good” />; }; const Share = () => { return <List tab=“share” />; }; const Ask = () => { return <List tab=“ask” />; }; const Job = () => { return <List tab=“job” />; }; const Top = createTabNavigator( { Good: { navigationOptions: { title: “精华” }, screen: Good }, Share: { navigationOptions: { title: “分享” }, screen: Share }, Ask: { navigationOptions: { title: “问答” }, screen: Ask }, Job: { navigationOptions: { title: “工作” }, screen: Job } }, { lazy: true, tabBarPosition: “bottom”, swipeEnabled: true, animtionEnabled: true } );
export default Top;