Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redux modules for the Features, not for Domains/Entities #82

Open
dzintars opened this issue Jul 26, 2020 · 2 comments
Open

Redux modules for the Features, not for Domains/Entities #82

dzintars opened this issue Jul 26, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request fix Some non-critical/cosmetic fix/refactoring

Comments

@dzintars
Copy link
Owner

dzintars commented Jul 26, 2020

It is wrong to think in terms of Domains/Entities when creating Redux module. Quite soon you will end up with the situation, when you want to combine slices from the different modules.
Instead you should think in terms of Features. For example, i have this app-navigation component (so called - Feature). This components simply displays list of the modules for the given application. So, we need an application ID to get its module id's and then the rest of the data for the every module.
This means we should hit 2 API endpoints to combine this data.
Don't forget also about the data normalization.
So, this seems a good case to implement app-navigation module in Redux. And it helps to maintain decoupling.

@dzintars dzintars self-assigned this Jul 26, 2020
@dzintars dzintars added enhancement New feature or request fix Some non-critical/cosmetic fix/refactoring labels Jul 26, 2020
@dzintars
Copy link
Owner Author

dzintars commented Aug 1, 2020

I created API method to request all required data at one go.
dzintars/wss@24e448e
dzintars/wss@5959732

This seems could work. For sure its quick and dirty, but the general idea is like that. Pass the app ID and get all the modules.

@dzintars
Copy link
Owner Author

dzintars commented Aug 1, 2020

Still need to play with this "ideology" for some time to feel comfortable with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix Some non-critical/cosmetic fix/refactoring
Projects
None yet
Development

No branches or pull requests

1 participant