title: Why can't I pass this prop to the child component?
body: <p>I've been having a problem with React Route. I can pass pass2Parent={this.pass2Parent} to the Search component, but I can't pass data={data} to the Result component. </p>
  
  <p>I've been researching the problem for hours and I've explored using render instead of component in the route. Unfortunately, it had the side effect of calling an API multiple times and burning through my allowance.</p>
  
  <p>I just don't get why it's not working as it is..</p>
  
  <pre><code>render() {
    let data = this.state;
    console.log(data);
  
    return (
      &lt;div style={{height: "inherit"}}&gt;
        &lt;BrowserRouter&gt;
          &lt;Switch&gt;
            &lt;Route path='/' exact component={() =&gt; &lt;Search pass2Parent={this.pass2Parent}/&gt;}/&gt;
            &lt;Route path='/result' exact component={(data) =&gt; &lt;Result data={data}/&gt;}/&gt;
          &lt;/Switch&gt;
        &lt;/BrowserRouter&gt;
      &lt;/div&gt;
    );
  };
  </code></pre>
  
  <p>This is what console.log(data) returns:</p>
  
  <pre><code>{
    images: {total: 8327, total_pages: 833, results: Array(10)},
    weather: {coord: {…}, weather: Array(1), base: "stations", main: {…}, visibility: 10000, …}
  }
  </code></pre>
  
  <p>This is what console.log(this.props) looks like in the child component:</p>
  
  <pre><code>{
    data: {
      history: {length: 2, action: "POP", location: {…}, createHref: ƒ, push: ƒ, …},
      location: { pathname: "/result", search: "", hash: "", state: undefined },
      match: { path: "/result", url: "/result", isExact: true, params: {…} },
      staticContext: undefined,
    }
  }
  </code></pre>