Skip to content

Instantly share code, notes, and snippets.

@c0depanda
Last active Jan 6, 2019
Embed
What would you like to do?
<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