With our categories stored, we can now proceed with creating our ListCategories component. We want to display our category navigation in a sidebar on the home page, and also on a shop category page. As we want to show it in several places, we have a couple of options as to how we display it.
We can use the component in the template as we have with the <list-products> component. The issue with this is that if we want to display our list in a sidebar and our sidebar needs to be consistent across the site, we would have to copy and paste a lot of HTML between views.
A better approach would be to use named routes and set the template once in our index.html.
Update the app template to contain a <main> and an <aside> element. Within these, create a router-view, leaving the one inside main unnamed, while giving the one inside the aside element...