<template> <div v-for="corpus in getCorpora" v-bind:key="corpus.id"> <Corpus v-bind="corpus" /> </div> </template> <script> import Corpus from "../components/Corpus"; import { mapGetters } from "vuex"; export default { computed: { ...mapGetters(["getCorpora"]), }, created() { this.$store.dispatch("fetchCorpora"); }, components: { Corpus, }, }; </script>
What's wrong with this code? I'm trying to have component data display dynamically as I enter new data.
Your code should work fine if
getCorpora
is updated/responsive. I just created a demo, could you take a look and try to figure out the root cause of the issue you are facing?Demonstration (I just added an input and when blurred, the input value was added to the getCorpora array) :