componentDidMount() not being called when react component is mounted
<p>I've been attempting to fetch some data from a server and for some odd reason <code>componentDidMount()</code> is not firing as it should be. I added a <code>console.log()</code> statement inside of <code>componentDidMount()</code> to check if it was firing. I know the request to the server works as it should As I used it outside of react and it worked as it should.</p>

<pre class="lang-js prettyprint-override"><code>class App extends React.Component {
  constructor(props, context) {
    super(props, context);
    this.state = {
      obj: {}
    };
  };

  getAllStarShips () {
    reachGraphQL('http://localhost:4000/', `{
     allStarships(first: 7) {
       edges {
         node {
           id
           name
           model
           costInCredits
           pilotConnection {
             edges {
               node {
                 ...pilotFragment
               }
             }
           }
         }
       }
     }
    }
    fragment pilotFragment on Person {
     name
     homeworld { name }
   }`, {}). then((data) =&gt; {
     console.log('getALL:', JSON.stringify(data, null, 2))
      this.setState({
        obj: data
      });
   });
  }

  componentDidMount() {
    console.log('Check to see if firing')
    this.getAllStarShips();
  }

  render() {
    console.log('state:',JSON.stringify(this.state.obj, null, 2));
  return (
    &lt;div&gt;
      &lt;h1&gt;React-Reach!&lt;/h1&gt;
      &lt;p&gt;{this.state.obj.allStarships.edges[1].node.name}&lt;/p&gt;
    &lt;/div&gt;
  );
}

}

render(
  &lt;App&gt;&lt;/App&gt;,
  document.getElementById('app')
);
</code></pre>