title: Assign function return object to variable and pass it to a component as a prop
body: <p>I am having trouble doing one last thing here. I need to take the object that gets returned from the _request method and assign it to the propVals variable in the render method and then pass that variable to the channelValues prop on the SingleChannel component as you can see. My problem is that propVals is undefined when I return the SingleChannel component. I know the if statements are returning what they should be so the problem is that the SingleChannel component is being rendered before propVals recieves the object. I really have no idea what else to do. I have also tried calling the method directly from the SingleChannel component like channelValues={this._request(channel.name)}.</p>
  
  <pre><code>_request(name) {
  HTTP.call('GET', `https://api.twitch.tv/kraken/streams/${name}`,
    {headers: {Accept: 'application/vnd.twitchtv.v3+json'} },
    function(error, response) {
      if(error) {
        console.log(error)
      } else {
        if(response.data.stream === null) {
          return {streaming: false, game: "Not playing anything"}
  
        } else {
          return {streaming: true, game: response.data.stream.game}
  
  
        }
      }
  
    });
  }
  renderChannels() {
    const channels = this.props.channels;
    console.log(channels)
    return channels.map((channel) =&gt; {
      const propVals = this._request(channel.name);
      //console.log(propVals);
      return &lt;SingleChannel key={channel._id} channel={channel} channelValues={propVals}/&gt;
  
    });
  
  
  }
  </code></pre>