title: Unhandled Rejection (AbortError): The operation was aborted
body: <p>EDIT: react app crash only in firefox. when im using chrome, react app not crash. How to handle crash in firefox?</p>
  <p>I want to cancel http request when component is unmounted. Im using fetch() and AbortController.</p>
  <p>Im following <a href="https://stackoverflow.com/a/49906662/11241731">this guide</a>.</p>
  <p>But when component unmounted, react app is crash.</p>
  <p><a href="https://i.stack.imgur.com/PlrWp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PlrWp.png" alt="enter image description here" /></a></p>
  <p>this is my code:</p>
  <pre><code>import React, { useEffect, useState } from 'react'
  import AbortController from &quot;abort-controller&quot;
  
  function Label(){
    const abortController = new AbortController()
    const signal = abortController.signal
    const [labels, setLabels] = useState([])
  
      useEffect(() =&gt; {
        async function getLabels(){
            const req = await fetch(`${process.env.REACT_APP_SERVER_URL}/label`, {
                credentials: 'include',
                signal: signal
            })
            const res = await req.json()
          
            setLabels(res.data)
        }
      
        getLabels()
      
        // cancel httprequest if component unmounted
        return function cancel(){
            abortController.abort()
        }
    }, [])
  
  
  return (&lt;p&gt;ehehe&lt;/p&gt;)
  
  }
  </code></pre>