Hi I\'m making some function which call api and save that value in the state, and then it should dispatch when user leave the component. so I tried to use react useEffect ho