reactjs-redux-basics icon indicating copy to clipboard operation
reactjs-redux-basics copied to clipboard

What if parameter passed to action is not satisfying the condition to update state?

Open DedaDev opened this issue 7 years ago • 0 comments

This is more like question then issue,

I was looking at dispatch(setName(name)) code, and I wonder what if I have if statement in action and the parameter passed to action is not satisfying the if statement so I don't want to update the state. What should my action return, does it have to return something, is it an empty object or something else, or I should move dispatch callback inside my action and call it only if its statement satisfied.

DedaDev avatar Dec 02 '18 18:12 DedaDev