title: Passing route parameter through button to another page
body: <p>I am using materialui library along with react-router. In my top-level component, I have my routes specified:</p>
  <pre><code>class App extends Component {
    render() {
      const {classes} = this.props;
      return (
        &lt;React.Fragment&gt; 
          &lt;BrowserRouter&gt;
            &lt;Route render={({location}) =&gt; (
            &lt;TransitionGroup&gt;
            &lt;CSSTransition
                key={location.key}
                timeout={100}
                classNames=&quot;someanimation&quot;
              &gt;
            &lt;Switch location={location}&gt;
                 &lt;Route exact path=&quot;/&quot; component={HomePage} /&gt;
                 &lt;Route exact path=&quot;/customer/:id&quot; component={CustomerPage} /&gt;
                 &lt;Route component={ErrorPage} /&gt;
               &lt;/Switch&gt;
             &lt;/CSSTransition&gt;
           &lt;/TransitionGroup&gt;
         )} /&gt;
          &lt;/BrowserRouter&gt;
       &lt;/React.Fragment&gt;
      );
    }
  }
  </code></pre>
  <p>On my home page, I have some buttons which correspond to some customers. When I click the button it should now go to the customers' page with that customer id. My home page button looks like this:</p>
  <pre><code>&lt;Button component={Link} to=&quot;/customer/:id&quot;&gt;
                        Go To Customer id : {this.props.customer[100]}
                      &lt;/Button&gt;
  </code></pre>
  <p>From here I am unsure how to pass the customer id from this button to the customer page now?</p>
  <p>My customer page is simple and looks like this:</p>
  <pre><code>const Customer= () =&gt; {
      return(
          &lt;div &gt;
              &lt;h3&gt;Customer ID : {somehow get the id that was passed in here}&lt;/h3&gt;
          &lt;/div&gt;
      )
  }
  </code></pre>