Skip to content

examples - how to implement action type namespacing ? #786

Closed
@pbc

Description

@pbc

I have spent about a week now trying to find any good implementations of action type namespacing and have rolled my own which is based on Transition classes which hold definition of an action creator, reducer and a list of it's child transitions, but this approach requires way too much boiler plate code and it's problematic when you have a lot of very simple actions.

In all of the examples which you can find in this repo and plenty of others this problem is always ignored for some reason but this was the first problem I have spotted when started looking into Redux.

Am I missing something here ? You guys have no action type naming collisions ?

Can someone update the examples and show me how you deal with this problem or point me in the right direction ?

My specific case is related to having 2 separate admin panels on the frontend. One for testers and one for customers which will have their state stored in separate sections of the store ("testerAccount", "customerAccount"), but both of them will be able to do similar things for e.g. ADD_VIDEO_UPLOAD, ADD_COMMENT, etc, etc.

I would really appreciate your help here :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions