[Vuejs]-Passing Props Child -> Parent -> Other Child

0đź‘Ť

âś…

data() {
    return {
      data: {  //Is this what you're trying to do?
        initiativeList: []
      }
    };
  },

If the data attribute is intended, “initiativeList” should be changed to “data.initiativeList”.

<EncounterCard
      v-for="character in data.initiativeList"
      v-bind:key="character.id"
      v-bind:hp="character.hp"
      v-bind:name="character.name"
      v-bind:initiative="character.initiative"
    />

and

populateList(charList) {
    this.data.initiativeList = charList;
}

Leave a comment