title: Handling data from Async requests in React JS
body: <p>I have a class component, where I am getting data from async request in its local props. This data is in form of array, which I loop through and display some list elements. For the first time component renders, I receive empty array and then populated array from server. Next time component renders, I receive empty array again,  Which means data in local props is null now, which makes sense. Any explanations how to deal with that, so I have populated array. </p>
  
  <p>See code below:</p>
  
  <pre><code>const {List} = this.props; //data in local props of a component
  &lt;ListGroup&gt;
      {
          List.map((f, index) =&gt; {
              return (
                  &lt;ListGroup.Item 
                      action
                      href="" 
                      key={f.get('ID')}
                      value = {f.get('ID')}
                      onClick={this.handleClick}
                  &gt;
                      {f.get('NAME')}
                  &lt;/ListGroup.Item&gt;
              )
          })
      }
  &lt;/ListGroup&gt; 
  </code></pre>
  
  <p>Then I have some button to switch back forth between two components. When I want to swtich to this list the local data in props is undefined or I get error says "TypeError: Cannot read property 'map' of undefined". Hope it is enough, not sure how I can show complete code here.</p>