Skip to content

"Refactoring Reducers" recipe shouldn't promote over-abstraction #3173

Closed
@gaearon

Description

@gaearon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions