performing dispatch function when component unmounts using useEffect in Reactjs

前端 未结 0 981
被撕碎了的回忆
被撕碎了的回忆 2020-12-21 22:19

I want to perform a dispatch on the state items only when the component has been unmounted. So I tried this:

const dispatch = useDispatch();
         


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