react-native 导航栏的传值、tabbarNavigation 如何隐藏tabbar

就导导航栏的传值,可分为两种:@H_502_2@

1.通过类似于iOS中的通知deviceeventemitter来实现组件之间的通讯,相关链接见:http://www.cnblogs.com/hd1992/p/5659261.html@H_502_2@

2.导航栏需要向它的组件传值@H_502_2@,一个navigator组件被@H_502_2@StackNavigator(...)创建出来,可以伴随以下属性。@H_502_2@@H_502_17@ ·@H_502_2@screenProps- 为子界面传递额外的参数、选项,for example:@H_502_2@

const@H_502_2@ SomeStack = StackNavigator({ // config 配置该navigator@H_502_2@});<SomeStack //通过this.props.screenProps获得该参数内容@H_502_2@ screenProps={ /* this prop will get passed to the screen components as this.props.screenProps */@H_502_2@}/>
上述内容来自: http://www.jianshu.com/p/80408a62d690@H_502_2@

3.用redux管理状态(暂时没去研究).

tabbarNavigation 如何隐藏tabbar:
据官网介绍:https://github.com/happypancake/react-native-tab-navigator

Hiding the Tab Bar

You can hide the tab bar by using styles. For example:

let@H_502_2@ tabBarHeight =@H_502_2@ 0@H_502_2@;
<@H_502_2@TabNavigator
  tabBarStyle=@H_502_2@{{ height:@H_502_2@ tabBarHeight,overflow:@H_502_2@ '@H_502_2@hidden'@H_502_2@@H_502_2@ }}
  scenestyle=@H_502_2@{{ paddingBottom:@H_502_2@ tabBarHeight }}
/@H_502_2@>@H_502_2@

相关文章

一、前言 在组件方面react和Vue一样的,核心思想玩的就是组件...
前言: 前段时间学习完react后,刚好就接到公司一个react项目...
前言: 最近收到组长通知我们项目组后面新开的项目准备统一技...
react 中的高阶组件主要是对于 hooks 之前的类组件来说的,如...
我们上一节了解了组件的更新机制,但是只是停留在表层上,例...
我们上一节了解了 react 的虚拟 dom 的格式,如何把虚拟 dom...