Is it possible to rely on the getter value of a computed property map inside a block created in a Vue instance?
P粉404539732
P粉404539732 2024-04-04 12:57:45
0
1
553

Wondering if - by the time - accessing a computed property that gets its value from storage - within the created block - I can be sure that the computed value has started.

async created(){
  !this.apps.length && await this.loadApps();
},
computed: {
  ...mapGetters('apps-store', ['apps']),
},

P粉404539732
P粉404539732

reply all(1)
P粉680000555

Hooks are just functions that are fired at the appropriate time - they are announcements not middleware. Therefore, async hooks do not wait to be completed. You should provide default values ​​for application getter__ in the getter function or its state.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template