I found few posts that give some "hints" on how to integrate navigation\routes with react-native-side-menu, unfortunately didn't find any post that show full working example of such functionality.
I'm also not sure what is the simplest implementation for navigation\routes, and what's the difference between these 2 options (of course this is not specifically to side menu, but in my case should join together).
Can any one point to such example ?
So eventually I was able to integrate standard Navigator as demonstrated in Facebook's official sample code:
https://github.com/facebook/react-native/tree/master/Examples/UIExplorer/Navigator
With react-native-side-menu component, and this is how the entire code looks like:
And index file should just point to Navigator:
You can check this complete sidemenu project on github. This project contains ToolbarAndroid, routes, DrawerLayoutAndroid, overflow menu and other components.
https://github.com/darde/react-native-sidemenu
I have a starter on my Github with
react-native-side-menu
andnavigator
.When using sidemenu, the
trick
forrouting
is to replace previous route to prevent it from stacking (like it should in a common navigation):Check my starter reactNativeReduxFastStarter
fast preview of code:
If you mean the drawer menu, check react-native-material-design and the given demo-app.