GithubHelp home page GithubHelp logo

Comments (8)

rassemdev avatar rassemdev commented on June 21, 2024 2

@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.

RuthenicEye avatar RuthenicEye commented on June 21, 2024 2

@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.

Jasbir23 avatar Jasbir23 commented on June 21, 2024

@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.

maartenvandillen avatar maartenvandillen commented on June 21, 2024

@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.

Jasbir23 avatar Jasbir23 commented on June 21, 2024

@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.

maartenvandillen avatar maartenvandillen commented on June 21, 2024

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.

rassemdev avatar rassemdev commented on June 21, 2024

By doing this solved my problem
draw.navigationOptions = {
header: null
}

from native-base-react-navigation-stack-navigator.

gupta-ji6 avatar gupta-ji6 commented on June 21, 2024

I am still facing this issue. None of the solution worked for me.

from native-base-react-navigation-stack-navigator.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.