title: React Navigation on tab change
body: <p>Without using Redux, how do I detect a tab change with a react navigation tab navigator? </p>
  
  <p>I know I need to somehow use onNavigationStateChange but I can't figure out how to update the current view. </p>
  
  <pre class="lang-js prettyprint-override"><code>export default () =&gt; &lt;MyTabNav
      ref={(ref) =&gt; { this.nav = ref; }}
      onNavigationStateChange={(prevState, currentState) =&gt; {
          //call function on current view
      }}
  /&gt;;
  </code></pre>