1//custom drawer content
2export default props => {
3 const { state, ...rest } = props;
4 const newState = { ...state} //copy from state before applying any filter. do not change original state
5 newState.routes = newState.routes.filter(item => item.name !== 'Login') //replace "Login' with your route name
6
7 return (
8 <DrawerContentScrollView {...props}>
9 <DrawerItemList state={newState} {...rest} />
10 </DrawerContentScrollView>
11 )
12}
1import { DrawerItems } from 'react-navigation';
2
3const visibleItems = ['HomeScreen', 'SettingsScreen', 'HelpScreen'];
4
5const getVisible = item => contains(item.key, visibleItems);
6
7const getFilteredAndStyledItems = ({ items, ...other }) => (
8 <DrawerItems
9 items={filter(getVisible, items)}
10 {...other}
11 />
12);