title: Getting an error "Type 'void' is not assignable to type 'ReactNode'"
body: <p>I'm trying to call this function</p>
  
  <pre><code>    compatiblelist() {
           CompatibleDevicesAPI().then(
             response =&gt; {this.getCompatList(response)}
         );
  
     }
  </code></pre>
  
  <p>It's giving an error whenever I call <code>{this.compatiblelist()}</code></p>
  
  <p>The function CompatibleDevicesAPI() looks like this</p>
  
  <pre><code>export default function CompatibleDevicesAPI() {
      return fetch("https://abc/jjklsd/jlasd").then((res) =&gt; {
          let results = [];
          for(var i=0;i&lt;res.response.docs.length;i++){
              let obj ={
                  'compManufacturer': res.response.docs[i].comanufacturer,
                  'comDisplayName': res.response.docs[i].comDisplayName ,
                  'id' : res.response.docs[i].id,
              }
              results.push(obj);
          }
          return results;
      }).catch((error) =&gt; {
          let results = [];
          results.push({
              'comManufacturer': 'error',
              'comDisplayName': error
          })
          return results;
      });
  }
  </code></pre>