This video is available to students only

Refactoring the Frontend

In this lesson, we're going to refactor our frontend

Refactoring the frontend#

We have been working on our API for quite a long time. We need to get our frontend back to match up the speed as well. If you run the frontend and backend server and open localhost 3000, you will see errors, because now the response we're receiving has taken a different shape. We are receiving paginated result and also, we have added few more properties to our course entity. Let's create a new model called paginatedCourse. If you remember, we have four properties there. Let's write them down here. Export interface PaginatedCourse and inside, we have pageIndex of type number, count of type number, pageSize of type number and data which will be array of course, so we can import Course here. Also, we have added more properties to our Course model, so add them as well.


We have added description of type string, category of type string, language of type string, level of type string, students of type number and subTitle of type string. Learnings will be an array of string or an empty string and same will be the requirements.


Start a new discussion. All notification go to the author.