I have a Vuex store that holds the state of the number of watched products. I am able to retrieve the product length from my store, but every time I attempt to {{getWatchlength}} in my code, I receive an error stating that "getWatchlength" is not defined
Here is the error message displayed in my console:
This is my Vuex store configuration: . It successfully retrieves the length from my store
This is the snippet of my HTML code:
<template>
<div id="app">
{{ getWatchLength }}
<router-view></router-view>
</div>
</template>
Below is my script tag:
<script>
import { mapActions } from "vuex";
import { mapGetters } from "vuex";
export default {
name: "app",
data() {
return {
categoryID: null,
categories: [],
products: [],
show: null
};
},
computed: {
...mapGetters( ["getWatchLength"], ["isLoggedIn"])
}
};
</script>
I'm unsure of what mistake I may be making. Any assistance would be greatly appreciated.