How to block the virtual back button on android device React Native

0

I am following a course of React Native and I have arrived at some of the scenes, my problem is that I have the first scena login and a second data sample and I would like to be able to remove or prevent the user from returning to the login at the moment to be in the second, how could I avoid that? I had thought that the moment I press it close the application or I do not know what they would recommend me
The code I have is this:

<Router sceneStyle={{margin: 0}} hideNavBar>
        <Scene>
            <Scene key="auth" hideNavBar>
                <Scene  hideNavBar={false} key="login" component={LoginForm} title="Inicie Sesion" initial/>
            </Scene>
            <Scene key="main" hideNavBar>
                <Scene
                    panHandlers={null}
                    gesturesEnabled={false}
                    onRight={() => BackHandler.exitApp()}
                    rightTitle="Add"
                    hideNavBar={false}
                    key="employedList" 
                    component={EmployeeList} 
                    title="Empleados" 
                />
            </Scene>
        </Scene>
    </Router>
    
asked by Israel Hernández Alfaro 24.02.2018 в 01:05
source

1 answer

0

I add these inside the Scene with that is blocked: D I hope you serve

<Scene
    key='HomePage'
    title='Menú Principal'
    gestureEnabled={false}
    panHandlers={null}
    back={true}/>
    
answered by 28.06.2018 / 20:05
source