Closed
Description
From https://redux.js.org/recipes/structuringreducers/refactoringreducersexample:
Now it's very clear what's happening in each case. We can also start to see some patterns emerging.
I'd argue the original code is clearest of all examples, and every next iteration makes it more complex due to giving names to every intermediate concept that doesn't really deserve a name. That's how people come to thinking Redux is complex.
I understand where the writer is coming from. But I don't think code like this should look like a recommendation. Maybe a less extreme version of this could be helpful but I think this form is giving the wrong impression.