Hacker Newsnew | past | comments | ask | show | jobs | submit | zesteh's commentslogin

In all our new projects we've started using redux with a smart + dumb component architecture and have had some great success. Redux makes keeping track of everything that's going on in large apps much easier. It also allows for only needing a few "smart" / container components that actually know about redux and global application state that then pass down only what's needed to simpler / "dumb" components. We like this approach so much we've even built out various starter projects. Link to angular 2 project: https://github.com/rangle/angular2-redux-starter Link to angular 1 project: https://github.com/rangle/angular-redux-starter


I go a minor step further, and pull out the components/actions/reducer by feature... additionally I'll separate out api into a separate file, for interactions with outside pieces (cors/xhr, etc), this way action creators don't have the logic for xhr requests (fetch or axios), and it's pretty clean... I use redux-thunk and redux-actions too.

Even for angular, it's a pretty nice workflow... I really don't care as much for angular as react. When the workflow is mostly the same, the quirkiness of angular (1 & 2) just stand out more imho.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: