Let's start with our constants file. What we need are constants that will support us firing away an AJAX request. We also need a constant for when we get our data back successfully, but we also need to cater to any error that might occur. This means we need the following three constants:
// product/product.constants.tsexport const FETCHING_PRODUCTS = "FETCHING_PRODUCTS";export const FETCHING_PRODUCTS_SUCCESSFULLY = "FETCHING_PRODUCTS_SUCCESSFULLY";export const FETCHING_PRODUCTS_ERROR = "FETCHING_PRODUCTS_ERROR";