My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Domain-Driven React/Redux - Hassan Djirdeh - Medium

Domain-Driven React/Redux - Hassan Djirdeh - Medium

Bill Schrockwitz's photo
Bill Schrockwitz
·Jul 5, 2017

How about we modify the above directory with a domain-driven mindset? Looking at our directory we can understand that there are four distinct domains. So we'll probably get something like this: src/ app/ App.js routes.js reducers.js cart/ Cart.js CartActions.js CartContainer.js CartReducer.js login/ Login.js LoginActions.js LoginContainer.js LoginReducer.js product/ Product.js ProductActions.js ProductContainer.js ProductList.js ProductReducer.js In terms of readability, it's now pretty evident the different domains that exist within the entire application.