title: What is the right way to communicate between child and parent component to change view content in Parent in react-native?
body: <p>I have a child component where I have a button.</p>
  
  <p>Now I have three of these child components placed next to each other in one Parent component. </p>
  
  <p>Whenever any of these child comp is touched, I wish to change stuff in my parent component. So whenever the button is clicked, I wish to change state (or whatever is the way to do it) in parent and then go on and change the list that. I am loading in another child component used in parent. But when I press those buttons, my app just freezes after 3-4 clicks every time.</p>
  
  <p>I thought maybe I am doing something very basic wrong. Like using the state/prop wrong and sending the app to infinite loop or something.</p>
  
  <p>Parent Component: </p>
  
  <pre><code>export default class Dash extends PureComponent {
  constructor(){
      super();
      // Bind the this context to the handler function
      this.state = {
          activeAuctionsCount: 15,
          wonAuctionsCount: 10,
          convertedLeadsCount: 6,
          isActiveAuctionsSelected: true,
          iswonAuctionsSelected: false,
          isconvertedLeadsSelected: false,
          cardSelected: 'auctions', /* auctions/won/leads */
      };
      this.loadActiveAuctions = this.loadActiveAuctions.bind(this);
      this.loadWonAuctions = this.loadWonAuctions.bind(this);
      this.loadconvertedLeads = this.loadconvertedLeads.bind(this);
  }
  
  // This method will be sent to the child component
  loadActiveAuctions() {
      console.log('active pressed');
      this.setState({
          cardSelected: 'auctions'
      });
  }
  loadWonAuctions() {
      console.log('won pressed');
      this.setState({
          cardSelected: 'won'
      });
  }
  loadconvertedLeads() {
      console.log('leads pressed');
      this.setState({
          cardSelected: 'leads'
      });
  }
  
  render() {
      return (
                              &lt;DealerShipDashStatsCard 
                              statCardLayoutPath={statCardLeft}
                              statCardTitle={'NOW'+"\n"+'SHOWING'}
                              statValue={this.state.activeAuctionsCount}
                              isSelected={this.state.isActiveAuctionsSelected} 
                              action={this.loadActiveAuctions}
                              /&gt;                         
                          &lt;/View&gt;
  </code></pre>
  
  <p>Child Component:</p>
  
  <pre><code>export default class DealershipDash_StatsCard extends Component {
    render() {
      console.log("Rendering DashStat Card "+ this.props.statCardTitle);
      return (
        &lt;ImageBackground 
        source={this.props.statCardLayoutPath} 
        style={styles.stat_card} 
        resizeMode="cover"
        resizeMethod="resize"&gt;
          &lt;View style={styles.cardTop}&gt;&lt;/View&gt;
          &lt;View style={styles.cardBottom}&gt;
              &lt;View style={styles.cardStatTitle}&gt;
                  &lt;Text style={[styles.statTitleText]}&gt;{this.props.statCardTitle}&lt;/Text&gt;
              &lt;/View&gt;
              &lt;View style={styles.cardStatValue}&gt;
                  &lt;Text style={styles.cardStatValueText}&gt;{this.props.statValue}&lt;/Text&gt;
              &lt;/View&gt;
              &lt;View style={styles.cardButton}&gt;
                  &lt;Image 
                  source={this.props.isSelected ? cardButtonActive : cardButtonInactive } 
                  style = {this.props.isSelected ? styles.stat_card_button : styles.stat_card_button_inactive}/&gt;
              &lt;/View&gt;
          &lt;/View&gt;
          &lt;Button onPress={this.props.action} title="press"/&gt;
        &lt;/ImageBackground&gt;
      );
    }
  }
  </code></pre>
  
  <p>Is there anything I'm doing wrong or not the react way? (this is my First project with react)</p>
  
  <p>I am also sometimes getting <code>Possible EventEmitter memory leak detected</code> warning in my metro bundler. When i check console, I see everything is getting re-rendered on every click, maybe that's making it so slow that it finally gives up?</p>