Hide header in stack navigator React navigationUse react-navigation without headerSet no header for all components React-Nativehow to display headers in react navigation with TabNavigationReact-Navigation: Cannot hide header with nested navigatorsReact Navigation with nested navigators not updating screensReact Navigation - navigating to another tab and reset stackReact Native - Stack Navigator inside Drawer Navigator inside Tab NavigatorReact Native - Change navigationOptions header components switching tabsReact Native : Hide header when using nested navigatorsHow to hide header on a specific screen of a TabNavigatorReact navigation Tab in Stack with button in Header

Why CLRS example on residual networks does not follows its formula?

How can bays and straits be determined in a procedurally generated map?

Japan - Plan around max visa duration

Why is an old chain unsafe?

What are these boxed doors outside store fronts in New York?

declaring a variable twice in IIFE

How to type dʒ symbol (IPA) on Mac?

Modification to Chariots for Heavy Cavalry Analogue for 4-armed race

Is it possible to do 50 km distance without any previous training?

Extreme, but not acceptable situation and I can't start the work tomorrow morning

Draw simple lines in Inkscape

Is there a familial term for apples and pears?

Shell script can be run only with sh command

A Journey Through Space and Time

Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?

Banach space and Hilbert space topology

What is the command to reset a PC without deleting any files

What Brexit solution does the DUP want?

How can I fix this gap between bookcases I made?

Why was the small council so happy for Tyrion to become the Master of Coin?

What typically incentivizes a professor to change jobs to a lower ranking university?

What is the meaning of "of trouble" in the following sentence?

Pronouncing Dictionary.com's W.O.D "vade mecum" in English

A function which translates a sentence to title-case



Hide header in stack navigator React navigation


Use react-navigation without headerSet no header for all components React-Nativehow to display headers in react navigation with TabNavigationReact-Navigation: Cannot hide header with nested navigatorsReact Navigation with nested navigators not updating screensReact Navigation - navigating to another tab and reset stackReact Native - Stack Navigator inside Drawer Navigator inside Tab NavigatorReact Native - Change navigationOptions header components switching tabsReact Native : Hide header when using nested navigatorsHow to hide header on a specific screen of a TabNavigatorReact navigation Tab in Stack with button in Header






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








47















I'm trying to switch screen using both stack and tab navigator.



const MainNavigation = StackNavigator(
otp: screen: OTPlogin ,
otpverify: screen: OTPverification,
userVerified:
screen: TabNavigator(
List: screen: List ,
Settings: screen: Settings
),
,
);


In this case stacknavigator is used first and then tabnavigator. and i want to hide headers of stack navigator. WIt is not working properly when i use navigationoptions like::



navigationOptions: header: visible: false 


i'm trying this code on first two components which are using in stacknavigator.
if i use this line then getting some error like::



enter image description here










share|improve this question




























    47















    I'm trying to switch screen using both stack and tab navigator.



    const MainNavigation = StackNavigator(
    otp: screen: OTPlogin ,
    otpverify: screen: OTPverification,
    userVerified:
    screen: TabNavigator(
    List: screen: List ,
    Settings: screen: Settings
    ),
    ,
    );


    In this case stacknavigator is used first and then tabnavigator. and i want to hide headers of stack navigator. WIt is not working properly when i use navigationoptions like::



    navigationOptions: header: visible: false 


    i'm trying this code on first two components which are using in stacknavigator.
    if i use this line then getting some error like::



    enter image description here










    share|improve this question
























      47












      47








      47


      7






      I'm trying to switch screen using both stack and tab navigator.



      const MainNavigation = StackNavigator(
      otp: screen: OTPlogin ,
      otpverify: screen: OTPverification,
      userVerified:
      screen: TabNavigator(
      List: screen: List ,
      Settings: screen: Settings
      ),
      ,
      );


      In this case stacknavigator is used first and then tabnavigator. and i want to hide headers of stack navigator. WIt is not working properly when i use navigationoptions like::



      navigationOptions: header: visible: false 


      i'm trying this code on first two components which are using in stacknavigator.
      if i use this line then getting some error like::



      enter image description here










      share|improve this question














      I'm trying to switch screen using both stack and tab navigator.



      const MainNavigation = StackNavigator(
      otp: screen: OTPlogin ,
      otpverify: screen: OTPverification,
      userVerified:
      screen: TabNavigator(
      List: screen: List ,
      Settings: screen: Settings
      ),
      ,
      );


      In this case stacknavigator is used first and then tabnavigator. and i want to hide headers of stack navigator. WIt is not working properly when i use navigationoptions like::



      navigationOptions: header: visible: false 


      i'm trying this code on first two components which are using in stacknavigator.
      if i use this line then getting some error like::



      enter image description here







      javascript react-native react-navigation expo






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 22 '17 at 13:45









      Avijit DuttaAvijit Dutta

      2911315




      2911315






















          11 Answers
          11






          active

          oldest

          votes


















          82














          I use this to hide the stack bar (notice this is the value of the second param):




          headerMode: 'none',
          navigationOptions:
          headerVisible: false,




          When you use the this method it will be hidden on all screens.



          In your case it will look like this:



          const MainNavigation = StackNavigator(
          otp: screen: OTPlogin ,
          otpverify: screen: OTPverification ,
          userVerified:
          screen: TabNavigator(
          List: screen: List ,
          Settings: screen: Settings
          ),

          ,

          headerMode: 'none',
          navigationOptions:
          headerVisible: false,


          );





          share|improve this answer

























          • Working perfectly! thanks for ur answer but i have one problem after adding this that is:: switching stacknavigator to tabnavigator its working fine. if i want to show header when i am switching screen from tabnavigator to stacknaviagtor what should i do?

            – Avijit Dutta
            Jun 22 '17 at 14:19






          • 1





            Hmm, that is a great Question. To be honest I don't know that. You can Try @Dpkstr answer on the screen you want to show it, instead of null it would be true.

            – Perry
            Jun 22 '17 at 14:30












          • Hmm, i already tried this but it was also not working... thanks for your first answer. I will make the second functionality using a button just for now.

            – Avijit Dutta
            Jun 22 '17 at 14:40











          • how to show and hide the header dynamically when click on button inside the component. If we give static navigationOptions = header: null . I will hide the header completely. I want to show or hide when click on some button

            – Venkatesh Somu
            Jul 6 '18 at 12:34











          • This option is not working anymore

            – Broda Noel
            Jul 23 '18 at 15:43


















          80














          Simply use below code in the page you want to hide the header



          export default class Login extends Component 
          static navigationOptions =
          header: null




          refer to Stack Navigator






          share|improve this answer

























          • It is worikng fine, but one problem is that when screen switch into tabNavigator from stacknavigator ( as per mention on my question components like OTPverification screen to list screen on that time both headers are showing

            – Avijit Dutta
            Jun 22 '17 at 14:16











          • Can you tell me how exactly you are navigating to List

            – Dpkstr
            Jun 23 '17 at 8:43











          • this one work for me

            – Ishan Fernando
            Feb 4 '18 at 16:13


















          16














          Just add this into your class/component code snippet and Header will be hidden



           static navigationOptions = header: null 





          share|improve this answer






























            7














            If you want to hide on specific screen than do like this:



            // create a component
            export default class Login extends Component<>
            static navigationOptions = header: null ;






            share|improve this answer






























              6














              If your screen is a class component



              static navigationOptions = ( navigation ) => 
              return
              header: () => null




              code this in your targeted screen as the first method (function).






              share|improve this answer

























              • right, header: () => null is the correct way, otherwise you get a header glitch when loading the page

                – Cristian Tr
                Jul 13 '18 at 21:54


















              4














              If someone searching how to toggle header so in componentDidMount write something like:



               this.props.navigation.setParams(
              hideHeader: true,
              );


              When



              static navigationOptions = ( navigation ) => 
              const params = = navigation.state;

              if (params.hideHeader)
              return
              header: null,



              return
              headerLeft: <Text>Hi</Text>,
              headerRight: <Text>Hi</Text>,
              headerTitle: <Text>Hi</Text>
              ;
              ;


              And somewhere when event finish job:



              this.props.navigation.setParams(
              hideHeader: false,
              );





              share|improve this answer






























                4














                Use



                static navigationOptions = header: null 


                in class/component like



                class Login extends Component 

                static navigationOptions =
                header: null







                share|improve this answer

























                • this worked for me in react-native@0.55.4! thank you

                  – DeveloperACE
                  Jun 18 '18 at 20:42


















                1















                In your targeted screen you have to code this !




                 static navigationOptions = ( navigation ) => 
                return
                header: null







                share|improve this answer
































                  1














                  const CallStack = createStackNavigator(
                  Calls: Calls,
                  CallsScreen:CallsScreen,
                  , headerMode: 'none');

                  CallStack.navigationOptions =
                  tabBarLabel: 'Calls',
                  tabBarIcon: ( focused ) => (
                  <TabBarIcon
                  focused=focused
                  name=Platform.OS === 'ios' ? 'ios-options' : 'md-options'
                  />
                  ),

                  header: null,

                  headerVisible: false,

                  ;





                  share|improve this answer






























                    1














                    This worked for me:



                    const Routes = createStackNavigator(
                    Intro:
                    screen: Intro,
                    navigationOptions:
                    header: null,


                    ,

                    initialRouteName: 'Intro',

                    );





                    share|improve this answer






























                      1














                      I am using header : null instead of header : visible : true i am using react-native cli. this is the example :



                      static navigationOptions = 
                      header : null
                      ;





                      share|improve this answer























                        Your Answer






                        StackExchange.ifUsing("editor", function ()
                        StackExchange.using("externalEditor", function ()
                        StackExchange.using("snippets", function ()
                        StackExchange.snippets.init();
                        );
                        );
                        , "code-snippets");

                        StackExchange.ready(function()
                        var channelOptions =
                        tags: "".split(" "),
                        id: "1"
                        ;
                        initTagRenderer("".split(" "), "".split(" "), channelOptions);

                        StackExchange.using("externalEditor", function()
                        // Have to fire editor after snippets, if snippets enabled
                        if (StackExchange.settings.snippets.snippetsEnabled)
                        StackExchange.using("snippets", function()
                        createEditor();
                        );

                        else
                        createEditor();

                        );

                        function createEditor()
                        StackExchange.prepareEditor(
                        heartbeatType: 'answer',
                        autoActivateHeartbeat: false,
                        convertImagesToLinks: true,
                        noModals: true,
                        showLowRepImageUploadWarning: true,
                        reputationToPostImages: 10,
                        bindNavPrevention: true,
                        postfix: "",
                        imageUploader:
                        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                        allowUrls: true
                        ,
                        onDemand: true,
                        discardSelector: ".discard-answer"
                        ,immediatelyShowMarkdownHelp:true
                        );



                        );













                        draft saved

                        draft discarded


















                        StackExchange.ready(
                        function ()
                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44701245%2fhide-header-in-stack-navigator-react-navigation%23new-answer', 'question_page');

                        );

                        Post as a guest















                        Required, but never shown

























                        11 Answers
                        11






                        active

                        oldest

                        votes








                        11 Answers
                        11






                        active

                        oldest

                        votes









                        active

                        oldest

                        votes






                        active

                        oldest

                        votes









                        82














                        I use this to hide the stack bar (notice this is the value of the second param):




                        headerMode: 'none',
                        navigationOptions:
                        headerVisible: false,




                        When you use the this method it will be hidden on all screens.



                        In your case it will look like this:



                        const MainNavigation = StackNavigator(
                        otp: screen: OTPlogin ,
                        otpverify: screen: OTPverification ,
                        userVerified:
                        screen: TabNavigator(
                        List: screen: List ,
                        Settings: screen: Settings
                        ),

                        ,

                        headerMode: 'none',
                        navigationOptions:
                        headerVisible: false,


                        );





                        share|improve this answer

























                        • Working perfectly! thanks for ur answer but i have one problem after adding this that is:: switching stacknavigator to tabnavigator its working fine. if i want to show header when i am switching screen from tabnavigator to stacknaviagtor what should i do?

                          – Avijit Dutta
                          Jun 22 '17 at 14:19






                        • 1





                          Hmm, that is a great Question. To be honest I don't know that. You can Try @Dpkstr answer on the screen you want to show it, instead of null it would be true.

                          – Perry
                          Jun 22 '17 at 14:30












                        • Hmm, i already tried this but it was also not working... thanks for your first answer. I will make the second functionality using a button just for now.

                          – Avijit Dutta
                          Jun 22 '17 at 14:40











                        • how to show and hide the header dynamically when click on button inside the component. If we give static navigationOptions = header: null . I will hide the header completely. I want to show or hide when click on some button

                          – Venkatesh Somu
                          Jul 6 '18 at 12:34











                        • This option is not working anymore

                          – Broda Noel
                          Jul 23 '18 at 15:43















                        82














                        I use this to hide the stack bar (notice this is the value of the second param):




                        headerMode: 'none',
                        navigationOptions:
                        headerVisible: false,




                        When you use the this method it will be hidden on all screens.



                        In your case it will look like this:



                        const MainNavigation = StackNavigator(
                        otp: screen: OTPlogin ,
                        otpverify: screen: OTPverification ,
                        userVerified:
                        screen: TabNavigator(
                        List: screen: List ,
                        Settings: screen: Settings
                        ),

                        ,

                        headerMode: 'none',
                        navigationOptions:
                        headerVisible: false,


                        );





                        share|improve this answer

























                        • Working perfectly! thanks for ur answer but i have one problem after adding this that is:: switching stacknavigator to tabnavigator its working fine. if i want to show header when i am switching screen from tabnavigator to stacknaviagtor what should i do?

                          – Avijit Dutta
                          Jun 22 '17 at 14:19






                        • 1





                          Hmm, that is a great Question. To be honest I don't know that. You can Try @Dpkstr answer on the screen you want to show it, instead of null it would be true.

                          – Perry
                          Jun 22 '17 at 14:30












                        • Hmm, i already tried this but it was also not working... thanks for your first answer. I will make the second functionality using a button just for now.

                          – Avijit Dutta
                          Jun 22 '17 at 14:40











                        • how to show and hide the header dynamically when click on button inside the component. If we give static navigationOptions = header: null . I will hide the header completely. I want to show or hide when click on some button

                          – Venkatesh Somu
                          Jul 6 '18 at 12:34











                        • This option is not working anymore

                          – Broda Noel
                          Jul 23 '18 at 15:43













                        82












                        82








                        82







                        I use this to hide the stack bar (notice this is the value of the second param):




                        headerMode: 'none',
                        navigationOptions:
                        headerVisible: false,




                        When you use the this method it will be hidden on all screens.



                        In your case it will look like this:



                        const MainNavigation = StackNavigator(
                        otp: screen: OTPlogin ,
                        otpverify: screen: OTPverification ,
                        userVerified:
                        screen: TabNavigator(
                        List: screen: List ,
                        Settings: screen: Settings
                        ),

                        ,

                        headerMode: 'none',
                        navigationOptions:
                        headerVisible: false,


                        );





                        share|improve this answer















                        I use this to hide the stack bar (notice this is the value of the second param):




                        headerMode: 'none',
                        navigationOptions:
                        headerVisible: false,




                        When you use the this method it will be hidden on all screens.



                        In your case it will look like this:



                        const MainNavigation = StackNavigator(
                        otp: screen: OTPlogin ,
                        otpverify: screen: OTPverification ,
                        userVerified:
                        screen: TabNavigator(
                        List: screen: List ,
                        Settings: screen: Settings
                        ),

                        ,

                        headerMode: 'none',
                        navigationOptions:
                        headerVisible: false,


                        );






                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Aug 21 '17 at 10:17

























                        answered Jun 22 '17 at 13:49









                        PerryPerry

                        3,33712132




                        3,33712132












                        • Working perfectly! thanks for ur answer but i have one problem after adding this that is:: switching stacknavigator to tabnavigator its working fine. if i want to show header when i am switching screen from tabnavigator to stacknaviagtor what should i do?

                          – Avijit Dutta
                          Jun 22 '17 at 14:19






                        • 1





                          Hmm, that is a great Question. To be honest I don't know that. You can Try @Dpkstr answer on the screen you want to show it, instead of null it would be true.

                          – Perry
                          Jun 22 '17 at 14:30












                        • Hmm, i already tried this but it was also not working... thanks for your first answer. I will make the second functionality using a button just for now.

                          – Avijit Dutta
                          Jun 22 '17 at 14:40











                        • how to show and hide the header dynamically when click on button inside the component. If we give static navigationOptions = header: null . I will hide the header completely. I want to show or hide when click on some button

                          – Venkatesh Somu
                          Jul 6 '18 at 12:34











                        • This option is not working anymore

                          – Broda Noel
                          Jul 23 '18 at 15:43

















                        • Working perfectly! thanks for ur answer but i have one problem after adding this that is:: switching stacknavigator to tabnavigator its working fine. if i want to show header when i am switching screen from tabnavigator to stacknaviagtor what should i do?

                          – Avijit Dutta
                          Jun 22 '17 at 14:19






                        • 1





                          Hmm, that is a great Question. To be honest I don't know that. You can Try @Dpkstr answer on the screen you want to show it, instead of null it would be true.

                          – Perry
                          Jun 22 '17 at 14:30












                        • Hmm, i already tried this but it was also not working... thanks for your first answer. I will make the second functionality using a button just for now.

                          – Avijit Dutta
                          Jun 22 '17 at 14:40











                        • how to show and hide the header dynamically when click on button inside the component. If we give static navigationOptions = header: null . I will hide the header completely. I want to show or hide when click on some button

                          – Venkatesh Somu
                          Jul 6 '18 at 12:34











                        • This option is not working anymore

                          – Broda Noel
                          Jul 23 '18 at 15:43
















                        Working perfectly! thanks for ur answer but i have one problem after adding this that is:: switching stacknavigator to tabnavigator its working fine. if i want to show header when i am switching screen from tabnavigator to stacknaviagtor what should i do?

                        – Avijit Dutta
                        Jun 22 '17 at 14:19





                        Working perfectly! thanks for ur answer but i have one problem after adding this that is:: switching stacknavigator to tabnavigator its working fine. if i want to show header when i am switching screen from tabnavigator to stacknaviagtor what should i do?

                        – Avijit Dutta
                        Jun 22 '17 at 14:19




                        1




                        1





                        Hmm, that is a great Question. To be honest I don't know that. You can Try @Dpkstr answer on the screen you want to show it, instead of null it would be true.

                        – Perry
                        Jun 22 '17 at 14:30






                        Hmm, that is a great Question. To be honest I don't know that. You can Try @Dpkstr answer on the screen you want to show it, instead of null it would be true.

                        – Perry
                        Jun 22 '17 at 14:30














                        Hmm, i already tried this but it was also not working... thanks for your first answer. I will make the second functionality using a button just for now.

                        – Avijit Dutta
                        Jun 22 '17 at 14:40





                        Hmm, i already tried this but it was also not working... thanks for your first answer. I will make the second functionality using a button just for now.

                        – Avijit Dutta
                        Jun 22 '17 at 14:40













                        how to show and hide the header dynamically when click on button inside the component. If we give static navigationOptions = header: null . I will hide the header completely. I want to show or hide when click on some button

                        – Venkatesh Somu
                        Jul 6 '18 at 12:34





                        how to show and hide the header dynamically when click on button inside the component. If we give static navigationOptions = header: null . I will hide the header completely. I want to show or hide when click on some button

                        – Venkatesh Somu
                        Jul 6 '18 at 12:34













                        This option is not working anymore

                        – Broda Noel
                        Jul 23 '18 at 15:43





                        This option is not working anymore

                        – Broda Noel
                        Jul 23 '18 at 15:43













                        80














                        Simply use below code in the page you want to hide the header



                        export default class Login extends Component 
                        static navigationOptions =
                        header: null




                        refer to Stack Navigator






                        share|improve this answer

























                        • It is worikng fine, but one problem is that when screen switch into tabNavigator from stacknavigator ( as per mention on my question components like OTPverification screen to list screen on that time both headers are showing

                          – Avijit Dutta
                          Jun 22 '17 at 14:16











                        • Can you tell me how exactly you are navigating to List

                          – Dpkstr
                          Jun 23 '17 at 8:43











                        • this one work for me

                          – Ishan Fernando
                          Feb 4 '18 at 16:13















                        80














                        Simply use below code in the page you want to hide the header



                        export default class Login extends Component 
                        static navigationOptions =
                        header: null




                        refer to Stack Navigator






                        share|improve this answer

























                        • It is worikng fine, but one problem is that when screen switch into tabNavigator from stacknavigator ( as per mention on my question components like OTPverification screen to list screen on that time both headers are showing

                          – Avijit Dutta
                          Jun 22 '17 at 14:16











                        • Can you tell me how exactly you are navigating to List

                          – Dpkstr
                          Jun 23 '17 at 8:43











                        • this one work for me

                          – Ishan Fernando
                          Feb 4 '18 at 16:13













                        80












                        80








                        80







                        Simply use below code in the page you want to hide the header



                        export default class Login extends Component 
                        static navigationOptions =
                        header: null




                        refer to Stack Navigator






                        share|improve this answer















                        Simply use below code in the page you want to hide the header



                        export default class Login extends Component 
                        static navigationOptions =
                        header: null




                        refer to Stack Navigator







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Oct 11 '18 at 13:21









                        k.k.m.

                        5311




                        5311










                        answered Jun 22 '17 at 13:52









                        DpkstrDpkstr

                        1,04476




                        1,04476












                        • It is worikng fine, but one problem is that when screen switch into tabNavigator from stacknavigator ( as per mention on my question components like OTPverification screen to list screen on that time both headers are showing

                          – Avijit Dutta
                          Jun 22 '17 at 14:16











                        • Can you tell me how exactly you are navigating to List

                          – Dpkstr
                          Jun 23 '17 at 8:43











                        • this one work for me

                          – Ishan Fernando
                          Feb 4 '18 at 16:13

















                        • It is worikng fine, but one problem is that when screen switch into tabNavigator from stacknavigator ( as per mention on my question components like OTPverification screen to list screen on that time both headers are showing

                          – Avijit Dutta
                          Jun 22 '17 at 14:16











                        • Can you tell me how exactly you are navigating to List

                          – Dpkstr
                          Jun 23 '17 at 8:43











                        • this one work for me

                          – Ishan Fernando
                          Feb 4 '18 at 16:13
















                        It is worikng fine, but one problem is that when screen switch into tabNavigator from stacknavigator ( as per mention on my question components like OTPverification screen to list screen on that time both headers are showing

                        – Avijit Dutta
                        Jun 22 '17 at 14:16





                        It is worikng fine, but one problem is that when screen switch into tabNavigator from stacknavigator ( as per mention on my question components like OTPverification screen to list screen on that time both headers are showing

                        – Avijit Dutta
                        Jun 22 '17 at 14:16













                        Can you tell me how exactly you are navigating to List

                        – Dpkstr
                        Jun 23 '17 at 8:43





                        Can you tell me how exactly you are navigating to List

                        – Dpkstr
                        Jun 23 '17 at 8:43













                        this one work for me

                        – Ishan Fernando
                        Feb 4 '18 at 16:13





                        this one work for me

                        – Ishan Fernando
                        Feb 4 '18 at 16:13











                        16














                        Just add this into your class/component code snippet and Header will be hidden



                         static navigationOptions = header: null 





                        share|improve this answer



























                          16














                          Just add this into your class/component code snippet and Header will be hidden



                           static navigationOptions = header: null 





                          share|improve this answer

























                            16












                            16








                            16







                            Just add this into your class/component code snippet and Header will be hidden



                             static navigationOptions = header: null 





                            share|improve this answer













                            Just add this into your class/component code snippet and Header will be hidden



                             static navigationOptions = header: null 






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 18 '17 at 15:13









                            Vaibhav BacchavVaibhav Bacchav

                            53479




                            53479





















                                7














                                If you want to hide on specific screen than do like this:



                                // create a component
                                export default class Login extends Component<>
                                static navigationOptions = header: null ;






                                share|improve this answer



























                                  7














                                  If you want to hide on specific screen than do like this:



                                  // create a component
                                  export default class Login extends Component<>
                                  static navigationOptions = header: null ;






                                  share|improve this answer

























                                    7












                                    7








                                    7







                                    If you want to hide on specific screen than do like this:



                                    // create a component
                                    export default class Login extends Component<>
                                    static navigationOptions = header: null ;






                                    share|improve this answer













                                    If you want to hide on specific screen than do like this:



                                    // create a component
                                    export default class Login extends Component<>
                                    static navigationOptions = header: null ;







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Feb 21 '18 at 6:35









                                    Waqar UlHaqWaqar UlHaq

                                    421614




                                    421614





















                                        6














                                        If your screen is a class component



                                        static navigationOptions = ( navigation ) => 
                                        return
                                        header: () => null




                                        code this in your targeted screen as the first method (function).






                                        share|improve this answer

























                                        • right, header: () => null is the correct way, otherwise you get a header glitch when loading the page

                                          – Cristian Tr
                                          Jul 13 '18 at 21:54















                                        6














                                        If your screen is a class component



                                        static navigationOptions = ( navigation ) => 
                                        return
                                        header: () => null




                                        code this in your targeted screen as the first method (function).






                                        share|improve this answer

























                                        • right, header: () => null is the correct way, otherwise you get a header glitch when loading the page

                                          – Cristian Tr
                                          Jul 13 '18 at 21:54













                                        6












                                        6








                                        6







                                        If your screen is a class component



                                        static navigationOptions = ( navigation ) => 
                                        return
                                        header: () => null




                                        code this in your targeted screen as the first method (function).






                                        share|improve this answer















                                        If your screen is a class component



                                        static navigationOptions = ( navigation ) => 
                                        return
                                        header: () => null




                                        code this in your targeted screen as the first method (function).







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Jul 25 '18 at 15:48

























                                        answered Jun 7 '18 at 11:53







                                        user7023664



















                                        • right, header: () => null is the correct way, otherwise you get a header glitch when loading the page

                                          – Cristian Tr
                                          Jul 13 '18 at 21:54

















                                        • right, header: () => null is the correct way, otherwise you get a header glitch when loading the page

                                          – Cristian Tr
                                          Jul 13 '18 at 21:54
















                                        right, header: () => null is the correct way, otherwise you get a header glitch when loading the page

                                        – Cristian Tr
                                        Jul 13 '18 at 21:54





                                        right, header: () => null is the correct way, otherwise you get a header glitch when loading the page

                                        – Cristian Tr
                                        Jul 13 '18 at 21:54











                                        4














                                        If someone searching how to toggle header so in componentDidMount write something like:



                                         this.props.navigation.setParams(
                                        hideHeader: true,
                                        );


                                        When



                                        static navigationOptions = ( navigation ) => 
                                        const params = = navigation.state;

                                        if (params.hideHeader)
                                        return
                                        header: null,



                                        return
                                        headerLeft: <Text>Hi</Text>,
                                        headerRight: <Text>Hi</Text>,
                                        headerTitle: <Text>Hi</Text>
                                        ;
                                        ;


                                        And somewhere when event finish job:



                                        this.props.navigation.setParams(
                                        hideHeader: false,
                                        );





                                        share|improve this answer



























                                          4














                                          If someone searching how to toggle header so in componentDidMount write something like:



                                           this.props.navigation.setParams(
                                          hideHeader: true,
                                          );


                                          When



                                          static navigationOptions = ( navigation ) => 
                                          const params = = navigation.state;

                                          if (params.hideHeader)
                                          return
                                          header: null,



                                          return
                                          headerLeft: <Text>Hi</Text>,
                                          headerRight: <Text>Hi</Text>,
                                          headerTitle: <Text>Hi</Text>
                                          ;
                                          ;


                                          And somewhere when event finish job:



                                          this.props.navigation.setParams(
                                          hideHeader: false,
                                          );





                                          share|improve this answer

























                                            4












                                            4








                                            4







                                            If someone searching how to toggle header so in componentDidMount write something like:



                                             this.props.navigation.setParams(
                                            hideHeader: true,
                                            );


                                            When



                                            static navigationOptions = ( navigation ) => 
                                            const params = = navigation.state;

                                            if (params.hideHeader)
                                            return
                                            header: null,



                                            return
                                            headerLeft: <Text>Hi</Text>,
                                            headerRight: <Text>Hi</Text>,
                                            headerTitle: <Text>Hi</Text>
                                            ;
                                            ;


                                            And somewhere when event finish job:



                                            this.props.navigation.setParams(
                                            hideHeader: false,
                                            );





                                            share|improve this answer













                                            If someone searching how to toggle header so in componentDidMount write something like:



                                             this.props.navigation.setParams(
                                            hideHeader: true,
                                            );


                                            When



                                            static navigationOptions = ( navigation ) => 
                                            const params = = navigation.state;

                                            if (params.hideHeader)
                                            return
                                            header: null,



                                            return
                                            headerLeft: <Text>Hi</Text>,
                                            headerRight: <Text>Hi</Text>,
                                            headerTitle: <Text>Hi</Text>
                                            ;
                                            ;


                                            And somewhere when event finish job:



                                            this.props.navigation.setParams(
                                            hideHeader: false,
                                            );






                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Mar 17 '18 at 23:02









                                            ErnestynoErnestyno

                                            396413




                                            396413





















                                                4














                                                Use



                                                static navigationOptions = header: null 


                                                in class/component like



                                                class Login extends Component 

                                                static navigationOptions =
                                                header: null







                                                share|improve this answer

























                                                • this worked for me in react-native@0.55.4! thank you

                                                  – DeveloperACE
                                                  Jun 18 '18 at 20:42















                                                4














                                                Use



                                                static navigationOptions = header: null 


                                                in class/component like



                                                class Login extends Component 

                                                static navigationOptions =
                                                header: null







                                                share|improve this answer

























                                                • this worked for me in react-native@0.55.4! thank you

                                                  – DeveloperACE
                                                  Jun 18 '18 at 20:42













                                                4












                                                4








                                                4







                                                Use



                                                static navigationOptions = header: null 


                                                in class/component like



                                                class Login extends Component 

                                                static navigationOptions =
                                                header: null







                                                share|improve this answer















                                                Use



                                                static navigationOptions = header: null 


                                                in class/component like



                                                class Login extends Component 

                                                static navigationOptions =
                                                header: null








                                                share|improve this answer














                                                share|improve this answer



                                                share|improve this answer








                                                edited May 31 '18 at 7:50









                                                Jørgen R

                                                6,82073453




                                                6,82073453










                                                answered May 31 '18 at 7:18









                                                Vahid AkhtarVahid Akhtar

                                                13914




                                                13914












                                                • this worked for me in react-native@0.55.4! thank you

                                                  – DeveloperACE
                                                  Jun 18 '18 at 20:42

















                                                • this worked for me in react-native@0.55.4! thank you

                                                  – DeveloperACE
                                                  Jun 18 '18 at 20:42
















                                                this worked for me in react-native@0.55.4! thank you

                                                – DeveloperACE
                                                Jun 18 '18 at 20:42





                                                this worked for me in react-native@0.55.4! thank you

                                                – DeveloperACE
                                                Jun 18 '18 at 20:42











                                                1















                                                In your targeted screen you have to code this !




                                                 static navigationOptions = ( navigation ) => 
                                                return
                                                header: null







                                                share|improve this answer





























                                                  1















                                                  In your targeted screen you have to code this !




                                                   static navigationOptions = ( navigation ) => 
                                                  return
                                                  header: null







                                                  share|improve this answer



























                                                    1












                                                    1








                                                    1








                                                    In your targeted screen you have to code this !




                                                     static navigationOptions = ( navigation ) => 
                                                    return
                                                    header: null







                                                    share|improve this answer
















                                                    In your targeted screen you have to code this !




                                                     static navigationOptions = ( navigation ) => 
                                                    return
                                                    header: null








                                                    share|improve this answer














                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited May 31 '18 at 10:40

























                                                    answered May 31 '18 at 10:39









                                                    Pheng SengvuthyPheng Sengvuthy

                                                    1458




                                                    1458





















                                                        1














                                                        const CallStack = createStackNavigator(
                                                        Calls: Calls,
                                                        CallsScreen:CallsScreen,
                                                        , headerMode: 'none');

                                                        CallStack.navigationOptions =
                                                        tabBarLabel: 'Calls',
                                                        tabBarIcon: ( focused ) => (
                                                        <TabBarIcon
                                                        focused=focused
                                                        name=Platform.OS === 'ios' ? 'ios-options' : 'md-options'
                                                        />
                                                        ),

                                                        header: null,

                                                        headerVisible: false,

                                                        ;





                                                        share|improve this answer



























                                                          1














                                                          const CallStack = createStackNavigator(
                                                          Calls: Calls,
                                                          CallsScreen:CallsScreen,
                                                          , headerMode: 'none');

                                                          CallStack.navigationOptions =
                                                          tabBarLabel: 'Calls',
                                                          tabBarIcon: ( focused ) => (
                                                          <TabBarIcon
                                                          focused=focused
                                                          name=Platform.OS === 'ios' ? 'ios-options' : 'md-options'
                                                          />
                                                          ),

                                                          header: null,

                                                          headerVisible: false,

                                                          ;





                                                          share|improve this answer

























                                                            1












                                                            1








                                                            1







                                                            const CallStack = createStackNavigator(
                                                            Calls: Calls,
                                                            CallsScreen:CallsScreen,
                                                            , headerMode: 'none');

                                                            CallStack.navigationOptions =
                                                            tabBarLabel: 'Calls',
                                                            tabBarIcon: ( focused ) => (
                                                            <TabBarIcon
                                                            focused=focused
                                                            name=Platform.OS === 'ios' ? 'ios-options' : 'md-options'
                                                            />
                                                            ),

                                                            header: null,

                                                            headerVisible: false,

                                                            ;





                                                            share|improve this answer













                                                            const CallStack = createStackNavigator(
                                                            Calls: Calls,
                                                            CallsScreen:CallsScreen,
                                                            , headerMode: 'none');

                                                            CallStack.navigationOptions =
                                                            tabBarLabel: 'Calls',
                                                            tabBarIcon: ( focused ) => (
                                                            <TabBarIcon
                                                            focused=focused
                                                            name=Platform.OS === 'ios' ? 'ios-options' : 'md-options'
                                                            />
                                                            ),

                                                            header: null,

                                                            headerVisible: false,

                                                            ;






                                                            share|improve this answer












                                                            share|improve this answer



                                                            share|improve this answer










                                                            answered Dec 1 '18 at 20:10









                                                            donalddonald

                                                            173110




                                                            173110





















                                                                1














                                                                This worked for me:



                                                                const Routes = createStackNavigator(
                                                                Intro:
                                                                screen: Intro,
                                                                navigationOptions:
                                                                header: null,


                                                                ,

                                                                initialRouteName: 'Intro',

                                                                );





                                                                share|improve this answer



























                                                                  1














                                                                  This worked for me:



                                                                  const Routes = createStackNavigator(
                                                                  Intro:
                                                                  screen: Intro,
                                                                  navigationOptions:
                                                                  header: null,


                                                                  ,

                                                                  initialRouteName: 'Intro',

                                                                  );





                                                                  share|improve this answer

























                                                                    1












                                                                    1








                                                                    1







                                                                    This worked for me:



                                                                    const Routes = createStackNavigator(
                                                                    Intro:
                                                                    screen: Intro,
                                                                    navigationOptions:
                                                                    header: null,


                                                                    ,

                                                                    initialRouteName: 'Intro',

                                                                    );





                                                                    share|improve this answer













                                                                    This worked for me:



                                                                    const Routes = createStackNavigator(
                                                                    Intro:
                                                                    screen: Intro,
                                                                    navigationOptions:
                                                                    header: null,


                                                                    ,

                                                                    initialRouteName: 'Intro',

                                                                    );






                                                                    share|improve this answer












                                                                    share|improve this answer



                                                                    share|improve this answer










                                                                    answered Mar 9 at 3:36









                                                                    Diego Santa Cruz MendezúDiego Santa Cruz Mendezú

                                                                    1,084811




                                                                    1,084811





















                                                                        1














                                                                        I am using header : null instead of header : visible : true i am using react-native cli. this is the example :



                                                                        static navigationOptions = 
                                                                        header : null
                                                                        ;





                                                                        share|improve this answer



























                                                                          1














                                                                          I am using header : null instead of header : visible : true i am using react-native cli. this is the example :



                                                                          static navigationOptions = 
                                                                          header : null
                                                                          ;





                                                                          share|improve this answer

























                                                                            1












                                                                            1








                                                                            1







                                                                            I am using header : null instead of header : visible : true i am using react-native cli. this is the example :



                                                                            static navigationOptions = 
                                                                            header : null
                                                                            ;





                                                                            share|improve this answer













                                                                            I am using header : null instead of header : visible : true i am using react-native cli. this is the example :



                                                                            static navigationOptions = 
                                                                            header : null
                                                                            ;






                                                                            share|improve this answer












                                                                            share|improve this answer



                                                                            share|improve this answer










                                                                            answered 12 hours ago









                                                                            Cevin WaysCevin Ways

                                                                            313




                                                                            313



























                                                                                draft saved

                                                                                draft discarded
















































                                                                                Thanks for contributing an answer to Stack Overflow!


                                                                                • Please be sure to answer the question. Provide details and share your research!

                                                                                But avoid


                                                                                • Asking for help, clarification, or responding to other answers.

                                                                                • Making statements based on opinion; back them up with references or personal experience.

                                                                                To learn more, see our tips on writing great answers.




                                                                                draft saved


                                                                                draft discarded














                                                                                StackExchange.ready(
                                                                                function ()
                                                                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44701245%2fhide-header-in-stack-navigator-react-navigation%23new-answer', 'question_page');

                                                                                );

                                                                                Post as a guest















                                                                                Required, but never shown





















































                                                                                Required, but never shown














                                                                                Required, but never shown












                                                                                Required, but never shown







                                                                                Required, but never shown

































                                                                                Required, but never shown














                                                                                Required, but never shown












                                                                                Required, but never shown







                                                                                Required, but never shown







                                                                                Popular posts from this blog

                                                                                Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

                                                                                2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

                                                                                Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme