title: React, Fetch-API, no-cors, opaque response, but still in browser memory
body: <p>I've been trying to make an React site, which would fetch a GET-response from API and print it out to my .html-file. I've managed to fetch the file just right, but i can't access the JSON-data server sends me.</p>
  
  <p>If i use no-cors in my Fetch-request, i get an opaque response containing pretty much nothing, but <strong>if i go to Developer tools i can find my data there and read it</strong>. If i do use cors, almost same thing. I get an 403-error, but my data is in the browser memory, but my code doesn't print it out. I can find the response from Network in developer tools.</p>
  
  <p>Why does the server give me an error, but still i get my data? And how can i access it, if it's in the browser?</p>
  
  <pre><code>class Clock extends React.Component {
      constructor(props) {
          super(props)
            this.state = {data2: []}
            this.apihaku = this.apihaku.bind(this)
       }
  
       componentDidMount() {
           this.apihaku(),
           console.log("Hei")
       }
  
       apihaku () {
           fetch('https://#######/mapi/profile/',
           {method: 'GET', mode:'no-cors', credentials: 'include',
           headers: {Accept: 'application/json'}}
           ).then((response) =&gt; {
                console.log(response);
                response.json().then((data) =&gt;{
                console.log(data);
           });
      });
  }
  
  render() {
      return &lt;div&gt;
          &lt;button&gt;Button&lt;/button&gt;
      &lt;/div&gt;
  }}
  
  ReactDOM.render(
     &lt;Clock /&gt;,
         document.getElementById('content')
  )
  </code></pre>
  
  <p>EDIT: Error images after trying out suggestions</p>
  
  <p><a href="https://i.stack.imgur.com/wp693.png" rel="nofollow noreferrer">https://i.stack.imgur.com/wp693.png</a></p>
  
  <p><a href="https://i.stack.imgur.com/07rSG.png" rel="nofollow noreferrer">https://i.stack.imgur.com/07rSG.png</a></p>
  
  <p><a href="https://i.stack.imgur.com/XwZsR.png" rel="nofollow noreferrer">https://i.stack.imgur.com/XwZsR.png</a></p>