react native - How to add Android Back Handler for a perticular screen? -


i have 3 screens myvault, add doc , add repo. myvault there 1 button add new doc clicking on add doc open. in add doc if user presses bank button want confirmation pop up. have 1 button inside add doc screen opens add repo screen user can select 1 repo , when click add screen poped , add doc screen refreshed repo data. if add listener in componentdidmount , remove in componentwillunmount issue when press on add repo popup comes. don't want popup on other screens, want on add doc.

note: using react native router flux routing

i have posted issue on link : https://github.com/facebook/react-native/issues/15248

as per react-native-router-flux documentation, event handlers can added buttons. can use onexit, onleft or onright. like:

<scene    key="adddoc"    component={adddoc}   onexit={() => console.log('your modal pop logic')} /> 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -