Vue router easily allows you to have dynamic URLs. A dynamic URL allows you to use the same component to display different data while using the same template. An example of this would be for a shop, where all the category pages look the same but display different data based on the URL. Another example would be a product detail page—you don't want to have to create a component for every product, so instead, you use one component with a URL parameter.
URL parameters can appear anywhere in the path, and there can be one or many. Each parameter gets assigned a key, so it can be created and accessed consistently. We'll go into dynamic routes and parameters in more detail during the Chapter 9, Using Vue-Router Dynamic Routes to Load Data. For now, we'll build a basic example.
Before we head into creating the component, let's...