title: Block/Disable tabs in TabNavigator - react-navigation
body: <p>I have a TabNavigator as shown in the picture.
  <a href="https://i.stack.imgur.com/M9Zfr.png" rel="noreferrer">Header Image</a></p>
  
  <p>I am using TabNavigator for creating these tabs as below.</p>
  
  <pre><code>const Tab_Navigator = TabNavigator({
      First:{
          screen: First,
      },
      Second:{
          screen: Second,
      },
      Third:{
          screen: Third,
      },
  </code></pre>
  
  <p>Now <strong>I want to block/disable "Second" and "Third" tabs. It should be visible but one shouldn't able to navigate to them.</strong></p>
  
  <p>I tried blocking these tabs as shown <a href="https://reactnavigation.org/docs/routers/#Blocking-Navigation-Actions" rel="noreferrer">here</a> but I guess I am missing something. My try:</p>
  
  <pre><code>Tab_Navigator.router.getStateForAction = (action, state) =&gt; {
  if( action.type === NavigationActions.navigate({ routeName: "Second"}) ||
      action.type === NavigationActions.navigate({ routeName: "Third"}))
  {
      return null;
  }
  
  return Byte.router.getStateForAction(action, state);
  </code></pre>
  
  <p>};</p>