title: How to hide and show navbar in React Native?
body: <p>I am passing props and when a particular height is scrolled I am passing params <code>showHeader: "True"</code> so when I scroll the header is non transparent and initially it is transparent. So after user scrolls back to top I want header to be transparent again but it is non transparent how can I fix this ?</p>
  
  <p>Code:</p>
  
  <p>Inisde ProjectDetailsScreen component :</p>
  
  <pre><code>handleScroll = (event) =&gt; {
          if(event.nativeEvent.contentOffset.y &gt; 100) {
              console.log("Height is this ", event.nativeEvent.contentOffset.y);
              this.props.navigation.setParams({ showHeader: "True"})
          }
      }
  
  &lt;ScrollView style={styles.container} 
                  onScroll={this.handleScroll}
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>Inside navigation.js:</p>
  
  <pre><code>ProjectDetails: {
          screen: ProjectDetailsScreen,
          navigationOptions: ({ navigation }) =&gt; ({
  
              headerTransparent: navigation.state.params.showHeader === "True" ? false : true ,
  
              headerTitle: navigation.state.params.myTitle,
          }),
        }
  </code></pre>
  
  <p>So initially header is transparent so after scrolling down header is non transparent but again if I scroll back to initial position I want header to be transparent how can I do this ?</p>