title: React: How to get results from one component to another component
body: <p>I am trying to create a search component, which should have an input field and a result list. My problem is how to get the result data to the result component.</p>
  
  <p>This is the input component:</p>
  
  <pre><code>import React, { Component } from 'react'
  import { searchData } from '/imports/api/search/methods.js';
  
  export default class Search extends Component {
      handleChange(event) {
          searchData.call(
              { value: event.target.value },
              (error, result) =&gt; {
                  if (result &amp;&amp; result.length &gt; 0) {
                      console.log(result); // &lt;-- Send this results to result component
                  }
              }
          );
      }
      render() {
          return (
              &lt;input type="text"
                  onChange={this.handleChange}
                  placeholder='Search'
              /&gt;
          )
      }
  }
  </code></pre>
  
  <p>And this should be my result list, which should be shown only if there is any result:</p>
  
  <pre><code>import React, { Component } from 'react'
  
  export default class SearchResult extends Component {
      render() {
          return (
              &lt;ul&gt;
                  &lt;li&gt;
                      // Show all result elements
                  &lt;/li&gt;
              &lt;/ul&gt;
          )
      }
  }
  </code></pre>