Build an Online Shop with Vue

State and Actions on Components

For a while we have not been creating components for the different features in our app. Currently, we just have our routes setup and few form pages for the admin. The app still needs:

  1. A list of products (Home page)
  2. Product details (Details Page)
  3. Cart (Cart Page) + Cart count
  4. A table of products (Admin)
  5. An edit form
  6. A loading spinner

We need individual/composed components to add the remaining features. Good news is, we already have the state ready. Therefore, we just retrieve state with setters and update state with actions and mutations.

Like this article? Follow @codebeast on Twitter