title: Pass props to a component, React Router V4
body: <p>I have an app with this components tree:</p>
  
  <pre><code>App
     Header
     Main
       Searcher
       List_of_albums
         Album
  </code></pre>
  
  <p>So, the idea is that in the main page I have a searcher of albums and this displays a list of albums after the search. To do this, I am reading a .json file in the component Main and then the props are passed to List_of_albums and Album.</p>
  
  <p>Everything works fine up to this point.</p>
  
  <p>Now I want to acces with a buttom to the info of each Album in a new route: /id_of_the_album.</p>
  
  <p>This buttom is localized in the component Album like this:</p>
  
  <pre><code>let albumLink = `/${this.props.id}`
  &lt;Link to={albumLink}&gt;&lt;/Link&gt;
  </code></pre>
  
  <p>To do that, I tried this in the component App:</p>
  
  <pre><code>import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
  
  class App extends Component {
    constructor(){
    super()
    }
  
    render () {
     return (
       &lt;Router&gt;
        &lt;Fragment&gt;
         &lt;Header /&gt;
          &lt;Switch&gt;
            &lt;Route exact path='/' render={() =&gt; {
             return(
               &lt;Main /&gt;
              )
            }} /&gt;
  
           &lt;Route path='/:id_of_the_album' render={() =&gt; {
             return(
               &lt;Profile /&gt;
             )
            }} /&gt;
            &lt;/Switch&gt;
          &lt;/Fragment&gt;
        &lt;/Router&gt;
      )
    }
  }
  </code></pre>
  
  <p>Where Profile is the new component to show the album details. 
  In this new Component I would like to open the jsons of the individual albums with something like this:</p>
  
  <pre><code>import singlejson from '../data/""""herethe_id_of_the_album"""".json'
  </code></pre>
  
  <p>but How can I pass to the component profile the id_of_the_album??</p>