Getters instead of accessing state directly

This commit is contained in:
Unknown
2019-06-22 20:07:11 +02:00
parent ba47943934
commit 6912a96f21
2 changed files with 10 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ export default {
}
},
created() {
this.categories = this.$store.state.data.resources.map(({ title, slug }) => ({ title, slug }))
this.categories = this.$store.getters['data/resources'].map(({ title, slug }) => ({ title, slug }))
}
}
</script>