Skip to content

Instantly share code, notes, and snippets.

@c0depanda
Last active January 6, 2019 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c0depanda/dfaf4b8d9a309d28d5dc07f73231481e to your computer and use it in GitHub Desktop.
Save c0depanda/dfaf4b8d9a309d28d5dc07f73231481e to your computer and use it in GitHub Desktop.
<template>
<main>
<h1>Cart Content</h1>
<p>{{cartValue}}</p>
</main>
</template>
<script>
export default {
computed: {
cartValue() {
// Accessing the Vuex state
return this.$store.state.cart;
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment