I am trying to update state just after action is dispatched but the problem with my code is state gets update before dispatching action. Here is the code
comp