title: React fetch returns undefined but in console it returns array
body: <p>I am using react-autosuggest I try to fetch the results from the server</p>
  
  <pre><code>getSuggestions (value) {
    const escapedValue = escapeRegexCharacters(value.trim());
  
    if (escapedValue === '') {
    return [];
    }
  
    const regex = new RegExp('^' + escapedValue, 'i');
      if (!value) {
          return Promise.resolve(myArr);
      }
    fetch(`/mypoint`)
      .then((response) =&gt; response.json())
      .then((users) =&gt; {
      if (users == undefined) {
  
        return []
      } else {
  
        return users
      }
      })
    .catch(err =&gt; {
      console.log(err)
    })
  
  
   }
  </code></pre>
  
  <p>This returns users from server when i console log it, no problem</p>
  
  <pre><code>  onSuggestionsFetchRequested = ({ value }) =&gt; {
      this.setState({
        isLoading: false,
        suggestions: this.getSuggestions(value),
      });
    };
  </code></pre>
  
  <p>This gets suggested values from the above function however when I write
  a word to input field</p>
  
  <blockquote>
    <p>The prop <code>suggestions</code> is marked as required in <code>Autosuggest</code>, but its value is <code>undefined</code>.</p>
  </blockquote>
  
  <p>I get suggestions as undefined even though it console the returned values from the server</p>
  
  <p>So the return inside fetch returns undefined what should I do any suggestions!</p>