DEV Community

shivamyaduwanshi
shivamyaduwanshi

Posted on

React Redux Dispatch Issue

I am new in react js and i am using redux for state management but i am facing one problem i am not understading how to overcome on it. I want to simply call dispatch after one dispatch is comlpeted. Write now my all dispatch call at a one time Can someone help me ?

Top comments (1)

Collapse
 
_bkeren profile image
'' • Edited

You can bind the changed value affected by the first dispatch to the component via useSelector. At the same component, you can use useEffect to listen changes for the first dispatched element all call second dispatch.

For advanced usage, look at Redux Saga.