javascript - React Native Navigator:仅在某些组件上显示导航栏

标签 javascript ios react-native

我有一个呈现Navigator的组件:

render() {
    return (
    <View style={{flex: 1}}>
        <Navigator
        style={{backgroundColor: '#31BC72'}}
            initialRoute={Home.route()}
            renderScene={(route, navigator) => {
                return React.createElement(route.component, _.extend({navigator: navigator}, route.passProps));
            }}
            configureScene={() => {
          return {
            ...Navigator.SceneConfigs.FadeAndroid,
            defaultTransitionVelocity: 10000,
            gestures: {}
          };
        }} />
    </View>
    );
}


那就是它的样子:

basic navigator component

当我推一条新路线时,假设从Home组件开始,它看起来像这样:

component that needs a navigation bar

我想在此组件上仅具有一个导航栏,该导航栏仅具有“后退”按钮。我不知道该怎么做。

最佳答案

关于javascript - React Native Navigator:仅在某些组件上显示导航栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34816419/

相关文章:

ios - WebP 编码的数据加载时间超过 30 秒

git - 如何构建依赖于特定 react-native 版本的私有(private) CocoaPod?

javascript - 如何从javascript中的json字符串中的对象列表中获取键

javascript - JS设置Cookie然后加载页面的方法

javascript - 使用按钮在 iOS webview 中模拟点击

javascript - 在 Javascript 中获取元素的转换类属性

objective-c - 为什么使用自定义时无法定义 IBOutlet "prototype tableviewcells"

android - Firebase 远程配置 : what is the definition of an "app instance" regarding percentile conditions?

javascript - react-native-video:无法读取 null 的属性 'Constants'

android - 按键对数组进行排序适用于 iOS,但不适用于 Android