, , :)
( , ),
, , - .
reducer . , "" , , , .
switch , , (, , )
if. .
, - " "
, , "ADD_TODO" "ADD_TODO"?
, import , .
"default: return state" ( DRY)
I can agree with this, but it is a very small price to pay for the benefits of listening to every action submitted (as I mentioned above). Anyway, there are ways to write "factory" functions to handle this for gearboxes, I just think it's overhead.
all reducers always call (calling functions do nothing just wrong)
Again, I think this is a huge gain, not a loss.
source
share