A shop is not really a usable shop if it does not have categories to navigate by. Fortunately, each of our products has a type key that indicates a category for it to be shown in. We can now create a category page that lists products from that particular category.
Creating categories
Creating a category list
Before we can display the products in a particular category, we first need to generate a list of available categories. To help with the performance of our app, we will also store the handles of the products in each category. The categories structure will look like the following:
categories = {
tools: {
name: 'Tools',
handle: 'tools',
products: ['product-handle', 'product-handle...