2

I am using React Native Router Flux (https://github.com/aksonov/react-native-router-flux) for the routing in my React Native app.

I would like to hide the navigation bar for some views, but not for others. Is there an easy way to do this?

1 Answer 1

1

Yes, there are some ways to do that.

Say for example you have two scenes and you want to hide the navbar when matching a scene.

according to the RNRF docs you can use hideNavBar property under Navigation Bar

https://github.com/aksonov/react-native-router-flux/blob/master/docs/API_CONFIGURATION.md

basic the code example will look like this

<Scene key="app">
    <Scene key="sceneOne" component={ComponentOne} title="SceneOne"  />
    <Scene key="sceneTwo" hideNavBar={true} component={ComponentTwo} title="SceneTwo"  />
</Scene>

Notice that on "SceneTwo" we use hideNavBar={true}

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.