title: React SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
body: <pre><code>    import React from 'react';
  
  
      class FetchData extends React.Component{
          state = {}
  
        setStateAsync(state) {
          return new Promise((resolve) =&gt; {
            this.setState(state, resolve)
          });
        }
  
        async componentDidMount() {
          const url="https://en.wikipedia.org/w/api.php?format=json&amp;action=query&amp;prop=extracts&amp;exintro=&amp;explaintext=&amp;titles=Stack%20Overflow"
          const res = await fetch(url,{mode:'no-cors'})
          const data = await res.json()
          await this.setStateAsync({data:data})
        }
  
          render(){
              return (
                &lt;div&gt;
                 {this.state.data}
                &lt;/div&gt;
              );
          }
      }
  
  export default FetchData
  </code></pre>
  
  <p>i am trying to make a simple wikipedia viewer app. I checked the network and tried using simple fetch function but this error seems to persist.</p>