title: How to redirect to another page and use props in reactjs
body: <p>in route i set <code>props</code>:</p>
  
  <pre><code>&lt;Route path="/getFilePage" exact component={GetFilePage} CourseName={props.CourseName} /&gt;
  </code></pre>
  
  <p>in main page i write this code for redirect:</p>
  
  <pre><code>return &lt;Redirect to={{
            pathname: '/getFilePage',
            CourseName:"C++"
         }}/&gt;
  </code></pre>
  
  <p>in <code>GetFilePage</code> component i write in componentDidMount <code>console.log(this.props.location.CourseName)</code> but is undefined</p>