title: Dropdown on react-select is still empty after load data from API
body: <p>I created an API on MVC.ASP.NET that returns data to a JSON format.
  I try to load a dropdown with data from this API but dropdown is still empty.</p>
  
  <p>When I load a static data in dropdown, He work fine.</p>
  
  <p>Im new in react, and may be the mistake is in my code.</p>
  
  <p>I'm not sure I'm getting the API data right</p>
  
  <p>I want to take only Station and StationName from this API.
  <a href="https://i.stack.imgur.com/crzQu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/crzQu.png" alt="API"></a></p>
  
  <p>My code:</p>
  
  <pre><code>import React, { Component } from 'react';
  import Select from 'react-select';
  import 'react-select/dist/react-select.css';
  
  function parseStations(stations) {
    return stations.map((station) =&gt; {
      return { label: station.NameStation, value: station.Station };
    });
  }
  
  export default class Weather extends Component {
    constructor(props) {
      super(props);
      this.state = {
        options: [
          { value: true, label: 'Yes' },
          { value: false, label: 'No' },
        ], stations: [
  
        ],
        value: null
      }
      this.state = { stations: null}
      this.onChange = this.onChange.bind(this);
    }
    onChange(event) {
      this.setState({ value: event.value });
      console.log('Boolean Select value changed to', event.value);
    }
  
    componentDidMount() {
      const data =  this.getStations();
      console.log(data)
    }
  
    // async getStations() {
    //   fetch('http://localhost:56348/api/stations', {
    //     data: 'Station',
    //     data: 'NameStation',
    //     method: "GET"
    //   }).then(res =&gt;
    //     console.log(res))
    //   // res.json())
    //   // .then(res =&gt; this.setState({ stations: parseStations(res.stations.Stations) }))
    //   //.then(res =&gt; this.setState({ stations: res.stations }))
    //   //.catch(e =&gt; )
    // }
  
    async getStations() {
      const res = await fetch('http://localhost:56348/api/stations', {
          method: 'GET',
          headers: {
              'Content-Type': 'application/json'
          },
      });
      return await res.json();
  }
  
    render() {
      if (!this.state.stations) return null;
      return (
        &lt;div className="MasterSection"&gt;
          &lt;div className="wrapper"&gt;
            &lt;div className="section"&gt;Изберете № на станция&lt;/div&gt;
            &lt;Select
              onChange={this.onChange}
              //options={this.state.options}
              options={this.state.stations}
              value={this.state.value}
              clearable={false}
            /&gt;
          &lt;/div&gt;
          &lt;div class="section"&gt;
            &lt;input type="text" class="form-control" placeholder="Дата (гггг-мм-дд)"
              aria-label="Username" aria-describedby="basic-addon1"&gt;&lt;/input&gt;
          &lt;/div&gt;
          &lt;div class="section"&gt;
            &lt;input type="text" class="form-control" placeholder="Брой дни назад"
              aria-label="Username" aria-describedby="basic-addon1"&gt;&lt;/input&gt;
          &lt;/div&gt;
          &lt;div class="section"&gt;
            &lt;button type="button" class="btn btn-outline-dark"&gt;Покажи&lt;/button&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        // &lt;div className="MasterSection"&gt;
        //   &lt;div className="wrapper"&gt;
        //     &lt;div className="section"&gt;Изберете № на станция&lt;/div&gt;
        //     &lt;Select
        //       onChange={this.onChange}
        //       //options={this.state.options}
        //       options={this.state.stations}
        //       value={this.state.value}
        //       clearable={false}
        //     /&gt;
        //   &lt;/div&gt;
        //   &lt;div class="section"&gt;
        //     &lt;input type="text" class="form-control" placeholder="Брой дни назад" aria-label="Username" aria-describedby="basic-addon1"&gt;&lt;/input&gt;
        //   &lt;/div&gt;
        //   &lt;div class="section"&gt;
        //     &lt;button type="button" class="btn btn-outline-dark"&gt;Покажи&lt;/button&gt;
        //   &lt;/div&gt;
        // &lt;/div&gt;
      );
    }
  }
  </code></pre>