What's the difference between these solutions when dealing with cleaning up of unmounted components? useRef vs boolean variable

后端 未结 0 779
刺人心
刺人心 2021-02-10 05:25

I\'ve learned that to prevent memory leaks, I\'m supposed to clean up after useEffect hooks which call async functions to update state.

I have found a couple of solutions

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