[Vuejs]-VUEJS3 / TYPESCRIPT View data imported from an API

0👍

Update your template with the following v-if condition

<template v-if="datas.length > 0">
    <div>
        <img :src="datas[0].image">
    </div>
</template>

Your code was resulting in a error in the console..

enter image description here

Basically, vue was trying to render before data is available. So this v-if condition should solve your problem.

Leave a comment