title: How to set params in react-router?
body: <p>I config <code>react-router</code> like this:</p>
  
  <pre><code>&lt;Route path="/" component={App}&gt;
      &lt;Route path="product"&gt;
          &lt;Route path="list" component={ProductListPage}/&gt;
      &lt;/Route&gt;
      &lt;Route path="priceReview"&gt;
          &lt;IndexRoute component={PriceReviewPage}/&gt;
      &lt;/Route&gt;
  &lt;/Route&gt;
  </code></pre>
  
  <p><code>App</code> Container like this:</p>
  
  <pre><code>&lt;div&gt;
      &lt;SideBar curId="index" /&gt;
  
      &lt;div className="layout-content"&gt;
          {this.props.children}
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><code>SideBar</code> like this</p>
  
  <pre><code>const data: Item[] = [
      { id: "index", desc: "Home", href: "/" },
      { id: "product-manage", desc: "product manager", href: "/product" },
  ];
  export const SideBar = ({ curId }) =&gt; (
      &lt;div className="sidebar-nav"&gt;&lt;h1 /&gt;
          &lt;ul&gt;
              {
                  data.map((item) =&gt; (
                      &lt;li key={item.id} className={curId === item.id ? "active" : ""}&gt;
                          {
                              item.isOld === true ?
                                  &lt;a href={item.href}&gt;&lt;i className="fa fa-home"/&gt;&lt;span
                                      className="hidden-tablet"&gt;{item.desc}&lt;/span&gt;&lt;/a&gt;
                                  :
                                  &lt;Link to={item.href}&gt;&lt;i className="fa fa-home"/&gt;&lt;span
                                      className="hidden-tablet"&gt;{item.desc}&lt;/span&gt;&lt;/Link&gt;
                          }
                      &lt;/li&gt;
                  ))
              }
          &lt;/ul&gt;
      &lt;/div&gt;
  );
  </code></pre>
  
  <p>What I want to do set <code>active</code> className when click the <code>Link</code> by this:</p>
  
  <pre><code> &lt;li key={item.id} className={curId === item.id ? "active" : ""}&gt;
  </code></pre>
  
  <p>so I have to set <code>curId</code>, but how can I set the <code>curId</code>?</p>