react async call + update best way to avoid memory leak

后端 未结 0 509
無奈伤痛
無奈伤痛 2021-01-05 10:44

well i have been using this method to avoid memory leak on unmounted components with async calls:

const isMounted =  useRef()
const [data,setData]=useState()
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题