hjeti / react-skeleton

A React skeleton
MIT License
5 stars 0 forks source link

Split store modules into action / reducer / selector #1

Open ThaNarie opened 5 years ago

ThaNarie commented 5 years ago

I like the 'module' approach of combining redux logic instead of having all actions, reducers and selectors in each single folder.

However, I think it would be better to split them out into separate file in each module folder:

How do you feel about this? :)

hjeti commented 5 years ago

I like the theory behind ducks, but I never used it in a project yet. So I didn't experience the downsides yet.

We can do the same as I also did in vue-skeleton by creating a seng-generator template called complex-store that separates actions, selectors and the reducer in separate files. Than everybody can choose what they want to use for a specific module. I never heard about anybody who used the complex-store in vue-skeleton but maybe it will be completely different in React.

Will splitting up also be the solution for your 3th point? If so then this could be a solution.