Pass extra parameter with the react router definition
<p>We're creating routes in ReactJS i.e. like that:</p>

<pre><code>&lt;Route path="/" component={App}&gt;
  &lt;IndexRoute component={Home}/&gt;
  &lt;Route path="/foo" component={SomeComponent} /&gt;
&lt;/Route&gt;
</code></pre>

<p>Is it possible to pass an extra parameter to the <code>SomeComponent</code> from the <code>Route</code> definition ? What I have to achieve is reuse the same component and discover this provided value in it:</p>

<pre><code>&lt;Route path="/" component={App}&gt;
  &lt;IndexRoute component={Home}/&gt;
  &lt;Route path="/foo" component={SomeComponent} params={key: 'foo'} /&gt;
  &lt;Route path="/bar" component={SomeComponent} params={key: 'bar'} /&gt;
&lt;/Route&gt;
</code></pre>