React Native + react-native-router-flux: How to apply hideNavBar to only one ?

前端 未结 1 1740
时光说笑
时光说笑 2021-01-24 17:13

In React Native using react-native-router-flux, I have two and when I apply hideNavBar to the first one, Login, it also app

1条回答
  •  执笔经年
    2021-01-24 17:44

    I am not sure about the reason. Probably it persists some state parameters accross diferent actions/PUSH. As a workaround, you can always try to be explicit: it worked for me.

    const RouterWithRedux = connect()(Router)
    const store = configureStore()
    
    export default class App extends Component {
      render() {
        return (
          
            
              
                
                
              
            
          
        )
      }
    }
    

    From that route on, NavBar is visible. It is appropriate if your Login only appears once throughout your scene flow.

    0 讨论(0)
提交回复
热议问题