title: GET request is not working in React Component
body: <p>I already imported the <code>axios</code> library and the <code>React</code>. I am making a get call in a <code>React</code> component, Request is proper and returning response also, it gives me this: </p>
  
  <pre><code>{"functionality": [
           {"category": "", "price": 2.0, "moltiplicator": 100.0, "name": "Plat"}
    ]
  }
  </code></pre>
  
  <p>but when i am setting the response to state variable, it is not working, this is code:</p>
  
  <pre><code>export class FetchDemo extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
        posts: []
      };
    }
  
    componentDidMount() {
      axios.get(`http://127.0.0.1:8080/get_platforms`)
        .then(res =&gt; {
          this.setState({
              posts: res.functionality
            });
        });
    }
  
    render() {
      return (
        &lt;div&gt;
          &lt;ul&gt;
            {this.state.posts.map(post =&gt;
              &lt;li &gt;{post.category}&lt;/li&gt;
            )}
          &lt;/ul&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>