From the course: Build Modern Web Apps with React, Hooks, State Management, and APIs Using Vite or Next.js

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Domain-based example

Domain-based example

Welcome back, let's study the domain-based organization structure for your large-scale projects. In this structure, you have to group by the business domains, not by the specific UI features, such as cart management or such as your checkout form, etc., rather you'll do payment, which which is one of the business domain, or maybe you'll do finance, etc. It becomes very helpful in complex applications such as e-commerce or banking applications, where you are going to have multiple business domains, because the UI features in these kind of applications are in large numbers. If you start to have a reducer for each of the UI feature, then at the end, you'll end up with a lot of reducers to work with. This is how an application structure should look like. You'll have a source folder. Inside you are going to have different domains folder. Obviously the domains are going to be near to finite numbers and manageable. And you can have accounts and all the accounting related logic and slices and…

Contents