Comments (10)
Ha!
I found the workaround, I just hide the header
from the top AppStackNavigator:
const ApplianceStackNavigator = StackNavigator({
ApplianceListScreen: { screen: ApplianceListScreen },
NewApplianceScreen: { screen: NewApplianceScreen }
}, {
initialRouteName: 'ApplianceListScreen',
headerMode: 'screen'
})
const MainDrawerNavigator = DrawerNavigator({
ApplianceStackNavigator: { screen: ApplianceStackNavigator }
}, {
initialRouteName: 'ApplianceStackNavigator',
headerMode: 'screen'
})
const AppStackNavigator = StackNavigator({
SplashScreen: { screen: SplashScreen },
AuthScreen: { screen: AuthScreen },
MainDrawerNavigator: { screen: MainDrawerNavigator }
}, {
headerMode: 'screen',
navigationOptions: { header: { visible: false } } // ADDED THIS
})
Not sure if this is the "right" solution or just a workaround though... In my opinion, It should be possible nesting two StackNavigator without doubling the Header (just like in ex-navigator)... what do you think?
from react-navigation.
Hi ,
Drawer nested navigation is working. please help
Below is my routing configuration
import React from 'react';
import { TabNavigator, StackNavigator, DrawerNavigator } from 'react-navigation';
import Login from '../containers/Login/LoginScreen';
import HomeContainer from '../containers/Home';
import ProfileContainer from '../containers/Profile';
import CreateProject from '../containers/CreateProject';
import DrawerMenu from '../components/DrawerMenu';
import Dimensions from 'Dimensions';
const HomeStackNavigator = StackNavigator({
Home: { screen: HomeContainer },
CreateProject: { screen: CreateProject }
}, {
headerMode: 'none',
navigationOptions: {
headerVisible: false,
}
});
const MainDrawerNavigator = DrawerNavigator({
HomeStackNavigator: { screen: HomeStackNavigator },
Profile: { screen: ProfileContainer }
},{
contentComponent: DrawerMenu,
drawerWidth: Dimensions.get('window').width - 100
}, {
headerMode: 'none',
navigationOptions: {
headerVisible: false,
}
});
const Root = StackNavigator({
Login: { screen: Login },
Authorize: { screen: MainDrawerNavigator }
}, {
headerMode: 'none',
navigationOptions: {
headerVisible: false,
}
});
export default Root;
Thanks in Advance
from react-navigation.
Can you check if it's fixed now?
from react-navigation.
Closing this since this has been fixed.
from react-navigation.
Sorry @satya164 , I couldn't try it this weekend!
Thanks for the fast reply, I tried to use the Master branch and the drawer works... but it shows me a double navigation bar now 👼
from react-navigation.
@mmazzarolo yeah, feel free to open a new issue for that
from react-navigation.
Actually I opened #88 for that
from react-navigation.
{
headerMode: 'none',
navigationOptions: {
headerVisible: false,
}
}); not working still there is header with white color arise on drawer pages
from react-navigation.
@pr4deep94
Format your code
from react-navigation.
Hello 👋
I have created a working example on react-navigation version-5.x.x, nesting different navigators -- stack, drawer & bottom-tabs. The overall approach has also been detailed in my blog section.
Link to github repo:
https://github.com/mvpbuddy/react-native-nested-navigators/
For a more detailed overview, you can checkout my blog on this:
https://mvpbuddy.io/blog/detail/how-to-build-an-app-with-nested-stack-drawer-bottom-tab-navigators
from react-navigation.
Related Issues (20)
- Crash due to useNativeDriver true for tab animations with android 12 devices HOT 3
- Cannot read property 'name' of undefined in "MaterialTopTabView" HOT 4
- Dropdown and popover components opening at incorrect position in iOS when using default header in React Navigation 6 stack HOT 2
- getState typescript error after version 6.1.10 HOT 1
- Header height not getting calculated in pageY value for components in new architecture HOT 3
- Incorrect pageY value when only using default header of react navigation stack in new architecture HOT 3
- v7 Navigating back randomly causes NAVIGATE action to be dispatched instead of GO_BACK HOT 2
- Possible EventEmitter memory leak detected HOT 1
- Pressable interaction issue with StackNavigator on iPhone Xs + new architecture HOT 8
- 7.0.0-alpha.15 @react-navigation/material-top-tabs - tabBarIcons are not showing. HOT 4
- Adjust the margin of the bottom menu bar HOT 3
- DRAWER ENCERRA O APLICATIVO HOT 10
- Sometimes duplicate tab bar labels appear in bottom tabs HOT 1
- unmountOnBlur shows white screen randomly when switchint tabs HOT 2
- useHeaderHeight changes several times when orientation changes HOT 3
- Navigate into page, increase RAM, navigate back and RAM stays high HOT 1
- When using frosted glass stack to jump in Android mode, ReactNavigation will experience lag and frosted glass will reset HOT 5
- Weird transition in navigation HOT 2
- Invariant Violation: requireNativeComponent: "RNSModalScreen" was not found in the UIManager. HOT 17
- [Bridgeless] [RN 0.74] Event cannot be both direct and bubbling: topFocus HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-navigation.