title: React Native: Rendering Component on Button Click
body: <p>I have a list of components that I want to render when the user clicks a button.  The screen is supposed to be a search screen where the user types in their query, and when they hit the search button a list of results is displayed.  However, when I try to make a component render using the onPress, nothing happens.  For this example I am just printing text instead of using map to print out components.  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>renderResults() {  
     return &lt;Text&gt; Doesn't get printed &lt;/Text&gt;
    }
  
    render() {
      return (
        &lt;View&gt;
          &lt;Button
            onPress={ this.renderResults.bind(this) } //use .bind(this) to access state in renderResults
            title="Search!"
            color="#841584" /&gt;
         &lt;/View&gt;
        );
    }</code></pre>
  </div>
  </div>
  </p>