React native router flux disable the Android back button to return to the login interface
•
Android
Using react native router flux, after the user successfully logs in, I want to disable the back button to return to the login screen. However, it seems that I can't find a way to get the current "Scene" or "stack", and then log in: @ h_ 404_ 3@
@H_ 404_ 3@
backAndroidHandler={() => {
if (currentScene === afterLoginScreeen) {
return true;
}
}}
Has anyone tried to deal with the problem@ H_ 404_ 3@
Solution: @ h_ 404_ 3@
Just like my experience on react native router flux @ h_ 404_ 3@
@H_ 404_ 3@
<Scene duration={0} key="main" component={Main} title="Some Title" type={ActionConst.RESET} />
It should be that you need to avoid returning to the login screen @ H_ 404_ 3@
ActionConst and Scene.type explaination@H_ 404_ 3@
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码