[Vuejs]-Vue.js data object not getting updated on mounted – vue-file-uploder

0👍

Template code is executed sychronously, whereas your data fetching is asychronous, meaning your Uploader component is always created with an empty images array.

Using conditional rendering you could add a v-if to wait to render/create the Uploader component until the images array is populated.

<Uploader
    v-if="images.length > 0"
    :media="images"
/>

Leave a comment