In the next module, we’ll build another type of application.
So far we’ve built:
- a Pixel drawing app
- a bill tracker
None of those apps had a complicated state. A simple state in the top component, App, was enough to live with.
None of those apps needed to change the URL when you moved to a different window. They could do that, of course, but it was not a requirement.
The next app we’ll build is an e-commerce site.
In this case, we’ll have to manage products, and the shopping cart, so we have a reasonably sized state to handle. We’ll use Vuex to help us.
We’ll also need different URLs based on the thing that’s displayed on the screen. A products list, a single product, the cart, and we’ll use the official Vue Router library to handle that.
Let’s first introduce the theory, then in the next module, we’ll jump to the code.