I'm trying to add a dynamic drawer to my app.
function CustomDrawerContent(props) {
return (
<SideMenu/>
);
}
function DrawerStack() {
return (
<Drawer.Navigator
initialRouteName="Home"
drawerStyle={{
backgroundColor: '#ffffff',
width: metrices.DEVICE_WIDTH * 0.7,
}}
drawerContent={props => <CustomDrawerContent {...props} />}
>
<Drawer.Screen name="Home" component={Home} />
</Drawer.Navigator>
);
}
Like the previous react-navigation, there is no contentComponent. so i have done this as suggested by the official docs of react navigation. but cannot get the dynamic sidemenu.