title: React native: header styles in navigationOptions not working
body: <p>I am fairly new to react-native. I am trying to set some global header styles for my app, but it's not working</p>
  <p><code>route.js</code></p>
  <pre><code>import React, { Component } from 'react';
  import { View } from 'react-native';
  import { createStackNavigator, createAppContainer } from &quot;react-navigation&quot;;
  import SplashScreen from '../screens/SplashScreen';
  import CalendarScreeen from '../screens/CalendarScreen';
  
  const NavStack = createStackNavigator(
      {
          Splash: {
              screen: SplashScreen,
              navigationOptions: {
                  header: null
              },
          },
          Calendar: {
              screen: CalendarScreeen,
              navigationOptions: {
                  title: 'Calendar',
              },
          },
      },
      {
          initialRouteName: 'Calendar',
          navigationOptions: {
              headerStyle: {
                  backgroundColor: '#28F1A6',
                  elevation: 0,
                  shadowOpacity: 0
              },
              headerTintColor: '#333333',
              headerTitleStyle: {
                  fontWeight: 'bold',
                  color: '#ffffff'
              }
          }
         
      }
  
  );
  
  const Routes = createAppContainer(NavStack);
  export default Routes;
  </code></pre>
  <p>Now, I am aware that I can do something like this in my class component</p>
  <pre><code>static navigationOptions = {
    title: 'Chat',
    headerStyle: { backgroundColor: 'red' },
    headerTitleStyle: { color: 'green' },
  }
  </code></pre>
  <p>as it is mentioned in here <a href="https://stackoverflow.com/questions/42855660/react-native-change-react-navigation-header-styling">possible alternative</a></p>
  <p>but I want to achieve the same from my <code>route.js</code></p>
  <p>I also tried <code>defaultNavigationOptions</code> like its mentioned in <a href="https://reactnavigation.org/docs/en/headers.html" rel="noreferrer">docs</a></p>
  <p>But no luck!!</p>