Last active
January 6, 2019 03:04
-
-
Save c0depanda/15f9c0704dfd70a13e153e1c174629fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<main> | |
<h1>Cart Content</h1> | |
<p>{{cartValue}}</p> | |
</main> | |
</template> | |
<script> | |
// Import Vuex Store into Component | |
import store from 'store.js'; | |
export default { | |
computed: { | |
cartValue() { | |
// Return Vuex state from store | |
return store.state.cart; | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment