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.

Layered architecture

Layered architecture

Welcome back, let's discuss layered architecture approach. We should use it when separation of concern is preferred, API calling, components, services are separately managed. This is the easiest approach to be used, especially when you are starting as a beginner. In this course, we will be using layered approach. We'll do exercises to break our codebase into other design approaches wherever necessary. That's how a layered design looks like. You have a components layer where all your UI components goes. You have a hooks folder where all your custom react hooks can go. The API calling logic can go into services. All your pages can go into the Pages folder. And so on. Let's discuss the pros of this approach. As it's very clean and intuitive, a new developer joining the team can easily add a new component in the codebase. It encourages code reuse to an extent. And lastly, it's very easy for beginners use. And with that, we have completed this lesson. In the next lesson, we'll run our…

Contents