title: loop data from state with react.js
body: <p>I'm doing my first reactjs app and i have run into some troubles. 
  This is my feature (child) component that i call from my base file.</p>
  
  <pre><code> var ReactDOM = require('react-dom');
    var React = require('react');
   var ConfigurationService = require('../configurationService');
  
   class Feature extends React.Component {
  constructor(props) {
      super(props);
      this.state = {
          features: null
      };
      this.getConfiguration();
  
  }   
  getConfiguration() {
      var self = this;
      var config = ConfigurationService.getConfiguration('test', 'test').then(function (config) {
          self.setState({ features: config.data.Features })
      });       
  }
  render() {
      if (this.state.features) {
          return (&lt;div&gt; {
              this.state.features.map(function (feature) {
                  &lt;span&gt;feature.Description&lt;/span&gt;
              })
          }
          &lt;/div&gt;)
      }
      else {
          return &lt;div&gt;no data&lt;/div&gt;
      }
  }
  }
  
  module.exports = Feature;
  </code></pre>
  
  <p>It calls my api and collects data that looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/abqIO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/abqIO.png" alt="enter image description here"></a></p>
  
  <p>For like a 10th of a second it shows the "no data" but then i guess that it succeeds to grab the data and that this.state.features no longer is null.
  But even though features isn't null it doesn't show anything in the browser.</p>