嵌套路由用于跳转详情StackNav.js

2018-10-22  本文已影响0人  __MX

//在com包下新建StackNav.js

import React, { Component } from "react";

import { createStackNavigator } from "react-navigation";

import BottomTabNav from "../com/BottomTabNav";

import Detail from "../util/Detail";

//嵌套路由

const StackNav = createStackNavigator({

  BottomTabNav: {

    screen: BottomTabNav,

    navigationOptions: {

      //去掉顶部导航的标题栏

      header: null

    }

  },

  Detail: Detail

});

export default StackNav;

上一篇 下一篇

猜你喜欢

热点阅读