title: Deep linking into an already open screen with different params. Is it possible?
body: <p>I'm working on an app which has a category screen where the relevant posts of the category are displayed. I'm using react-navigation to navigate between the screens and handle the deep linking. The category screen can be accessed in-app or via deep link. To access the category screen via deep link I'm using something like <code>myapp://category/:id</code>.</p>
  
  <p>If the app is already opened and is focused on the category screen the deep link does nothing.</p>
  
  <p>I've currently "fixed" it using the <code>componentDidUpdate</code> life cycle method to compare the ID stored in the state and the ID in <code>navigation.getParam</code>. </p>
  
  <pre class="lang-js prettyprint-override"><code>componentDidUpdate = () =&gt; {
    const { navigation } = this.props;
    const { categoryID } = this.state;
    const paramID = navigation.getParam('id', null);
  
    if (paramID !== categoryID) {
      this.setState({ categoryID: paramID }, () =&gt; {
        // fetch data
      });
    }
  }
  </code></pre>
  
  <p>However, this seems like a dirty fix to me. Is there a better way of doing this? Maybe opening all deep links using push instead of navigate via react-navigation?</p>