Comments (8)
@gupta-ji6 here is my index.js folder:
import React, { Component } from "react";
import HomeScreen from "./HomeScreen.js";
import ChatScreen from "../ChatScreen/index.js";
import ProfileScreen from "../ProfileScreen/index.js";
import SideBar from "../SideBar/SideBar.js";
import { DrawerNavigator } from "react-navigation";
const HomeScreenRouter = DrawerNavigator(
{
Home: {
screen: HomeScreen
},
Chat: {
screen: ChatScreen
},
ProfileScreen: {
screen: ProfileScreen
}
},
{
contentComponent: props => <SideBar {...props} />
}
);
HomeScreenRouter.navigationOptions = {
header: null
}
export default HomeScreenRouter;
that solved my problem
from native-base-react-navigation-stack-navigator.
@rassemdev ^^ this worked for me.. I just set the navigationOptions for my drawer stack.
Drawer.navigationOptions = {
header: null
}
from native-base-react-navigation-stack-navigator.
@maartenvandillen In react navigation sometimes predefined headers are appended. You could remove these headers by moving over to the parent router component and passing the prop
header: null, inside the router definition. You could also remove these headers from individual components like this.
static navigationOptions = ({ navigation }) => ({
header: null
})
from native-base-react-navigation-stack-navigator.
@Jasbir23 Thanks for your reply. I've tried your suggestion on all navigators and the SideBar itself but the only thing that removes the header is putting headerMode: 'none' on the main stack navigator. A consequence of that is that all screens lose their header and I'll have to put a header component in the render method of each. If that solves this issue I think I can live with that. If you have any other suggestion please let me know.
from native-base-react-navigation-stack-navigator.
@maartenvandillen You could try changing the version of react navigation from your package.json and rebuild. I did not have this issue with my app as you can see in the GIF, the header does not show up in the sidebar.
Other than that I believe writing your own headers is also doable. If they are too similar you could always make a component and re-use it. Not sure if this solves your problem. :)
from native-base-react-navigation-stack-navigator.
it's working now. I had to use the right combination of header values of false, none and float in all navigators involved. Thanks for your time!
from native-base-react-navigation-stack-navigator.
By doing this solved my problem
draw.navigationOptions = {
header: null
}
from native-base-react-navigation-stack-navigator.
I am still facing this issue. None of the solution worked for me.
from native-base-react-navigation-stack-navigator.
Related Issues (10)
- Passing params gives undefined HOT 1
- Error cloning repo
- Side bar is not not visible HOT 2
- Drawer Button is not working HOT 4
- cannot react-native run-android HOT 1
- Image urls in Sidebar.js are dead and return 404 HOT 2
- 130 Meg when cloning repository HOT 2
- Deprecated features HOT 4
- Image within image
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 native-base-react-navigation-stack-navigator.