Is it possible to get computed property value in created hook? My current implementation doesn’t work. My understanding is created hook would be called first which would call my async method and async method needs the computed property, but by the time computed property becomes available the created hook has already been executed with the “undefined” parameter.
Please suggest how can i make computed property available to created hook method.
created() {
this.fetchPropertyOptions();
},
computed: {
propertyList() {
return this.data.value;
},
},
methods: {
async fetchPropertyOptions() {
this.propertyOptionsMap = await api.GetOptions(this.propertyList);
},
}
this.data.valueshould bethis.value- Joseph Silbermounted()rather thancreated()? - Ru Chern Chong