Redux: user action vs logic action -


let's have list , button. element of list can selected (only 1 @ time). if element selected, button changes a, if not, changes b.

my question is, should have button fire action_button_clicked , reducer can figure out if it's supposed a or b based on it's current state (iselementselected) or should button decide action fire, action_a or action_b?

obs.: button have it's text button(a) or button(b) based on whether element selected or not.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -