Closed iamdey closed 8 years ago
Thank you for sharing your structure. I'm actually thinking about moving the data structure of an existing application to redux and had similar approaches in mind.
I would be nice to have a section with a example of Angular and Redux.
@floriangosse Do you have any articles that we can link to that promote this practice well? I'd be interested in writing up a blog post on 1.5 and $ngRedux so until then it may be worth dropping a "resource" in.
It could be great to have something for structuring a redux based angular app:
Actions
can be easily defined using service declaration in module component
Reducers
Reducers are pure functions and must be stored in the component as well
component/todo
andcomponent/todo-owner-manager
:They both need
todoReducer
and they have same importance, one cannot be a common module component.Middlewares
can be declared as factory in both module component and
app
component depending of the scope of the side effect.Store (aka redux config)
Further
Here I used ngRedux, I didn't know about ng-component-redux, I'll take a look asap, hope it helps to pass props to
reselect
functions.I've started to migrate the app I'm working on to this styleguide, I still have doubts and I'm using redux and reselect since a while. It is a free (libre) software, for curious people the source code is here: https://github.com/CaliOpen/caliopen.web-client-ng/tree/chore/angularjs_styleguide_es2015