-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

React Interview Guide
By :

The Redux store-related components cover most of the application actions, such as calculating the business logic, creating or updating the data inside the store, and fetching the latest data to display on the UI. In this project, the store components are categorized into product, cart, and user folders. Each folder contains files such as the entity type (*.type.ts
), a slice that contains actions or a reducer (*.slice.ts
), and a selector to retrieve the data (*.selector.ts
).
In our e-commerce application, the Product
entity is required to display details such as product name, brand, price, and quantity to showcase all the available products. So, let’s create the store components for the product entity first. The following product.type.ts
file creates the product and its relevant types, with all possible properties:
export type Product = { id: number productImageUrl: string name: string...