Last active
January 9, 2023 09:46
-
-
Save LORD-KAY/79b2a4378f64aa796d34b3d6474f7b9c to your computer and use it in GitHub Desktop.
Get a vuex store state value using getters
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> | |
<div> | |
<h1>All todo items </h1> | |
<div v-for="(item,index) in $store.getters['getAllTodos']" :key="index"> | |
<span>{{ item }}</span> | |
</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
data: () => ({ | |
}), | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment