title: how to pass params in url in reactjs using react router version4
body: <p>in react-router version 4, how to pass params in url, in older version i was using this.props.params. but it is depricated in this version so please help me.
  i am sending params this way</p>
  
  <pre><code>&lt;Link to={"/dashboard/viewProfile/"+id+"/"+type}&gt;View Profile&lt;/Link&gt;
  </code></pre>
  
  <p>and in routing</p>
  
  <pre><code>&lt;Route path="/dashboard/viewProfile/:id/:type" render={() =&gt; &lt;ViewProfile /&gt;} /&gt;
  </code></pre>
  
  <p>so now in view profile component how to get these params.</p>