Routing
The navigation routing about this starter kit
Drawer
Actually, our side menu is custom made, so we need to import it in contentComponent.
From the sample code, we imported the homeStack as Main, and set it for initial route
Additional handling
But we need additional handling for our seamless side menu, why?
It is because the side menu gesture is overlay with our detail screen. In detail screen, we swipe right to back previous screen, but this gesture will trigger our side menu too, so we need to lock the gesture for detail screen to prevent any side menu pop out.
From the sample code, we need to call the setDrawerLock function to prevent any side menu for detail screen. It will lock the side menu except the main screen. The full version of this function, you can check the code in App.js
Stack
According the sample code, we set three screen in grid stack with different names, it will help us much more easy to control the routing once the route getting complex.
Last updated