title: how to pass props one page to another page via react router?
body: <p>In my React app I'm using react-router-dom. In <code>App.js</code> I have set my routes. There I have three components: <code>/home</code>, <code>/customerinfo</code> and <code>/success</code>.</p>
  
  <p>In the home component I have a button. What I want is that when I press the button, the <code>customerinfo</code> component will load in full page and I want the state of the <code>home</code> component in the <code>customerinfo</code> component. This is what my <code>Route</code> looks like:    </p>
  
  <pre><code>&lt;Route
    path="/customerInfo"
    render={props =&gt; &lt;CustomerInfo {...props} /&gt;}
  /&gt;
  </code></pre>
  
  <p>But I don't have access of the state of the <code>home</code> component in <code>App.js</code>, so it's not working.</p>
  
  <p>How can I get the state of the <code>home</code> component in <code>customerinfo</code>?</p>
  
  <p>I'm new in React. Please help me.</p>