I am using react native navigation Wix side menu in my project. I want to close it when It is open and user clicks on mobile physical back icon. But I have defined for the back button to close my app when user clicks on it. So my back icon should do two following works:
1- it should close the menu when it is open. 2- it should exit from app when the menu is close.
I have saved the status of the side menu (open: true , close:false) in redux store to handle it. But the problem is when user open or close the menu with swiping on mobile screen. In this case I cannot update my state in redux store. I cannot disable this option (Swiping) of side menu in react native navigation to get ride of the problem. So I do not know how to fix it!