title: Proper way to use fetch with github api v3?
body: <p>I want to map all the issue titles for a repo and render them to li in a react component. I've been able to extract only the issue title using octokat library but unfortunately that library does not play nice with some other stuff i've got going on. Also, I'm sure i can do this with es6 and the fetch api.</p>
  
  <p>Original Post:</p>
  
  <p>Been having a hellava time finding info on using es6 fetch / promises with the github api. I'm trying to fetch issues for a repo but i'm obviously missing something... I've used a few different libraries to try and accomplish this but I'd like to just use fetch.</p>
  
  <p>Update: Now my new goal is merely to console.log the titles... baby steps.</p>
  
  <pre><code>import React from "react";
  
  export default class extends React.Component {
    constructor() {
      super()
      this.state = {
        issues: []
      }
    }
    componentWillMount() {
      // let issueArry = []
      const url = "https://api.github.com/repos/fightplights/chode-stream/issues"
      fetch(url)
        .then(response =&gt; response) // i've tried with and without .json()
        .then(body =&gt; console.log(body))
        // this logs the same response
  
    }
    render() {
      return (
        &lt;div&gt;
          &lt;ul&gt;
            {here i will map this.state.issues (once i can get them =))}
          &lt;/ul&gt;
        &lt;/div&gt;
      )
    }
  }
  </code></pre>
  
  <p>I know it's a simple error on my part. I'm still a fledgling. =)</p>
  
  <p>...and obviously i need to render to the dom (not shown here) </p>
  
  <p>@Andy_D is right that I wasn't parsing the body of the response, only the response itself (doh!) however now that i'm trying to data.map(issue => ...) I still get the error that data.map() is not a function. This leads me to believe that the data object is not the object the droids are looking for... <em>hand waves in front of screen</em></p>
  
  <p>Here's the response object in the first promise:</p>
  
  <pre><code>Response { 
    type: "cors", 
    url: "https://api.github.com/repos/fightp…", 
    redirected: false, 
    status: 200, 
    ok: true, 
    statusText: "OK", 
    headers: Headers, 
    bodyUsed: false 
  }
  </code></pre>
  
  <p>But when I take that response in the next 
      .then(data => console.log(data))
  It is undefined... 
  I have tried returning the first response => response.json() (as andy suggested) but it's already json... am i wrong?</p>