I'm at school trying to learn Vue-Native to build an Imgur-like app using imgur API.
I am testing my calls with an on-press function :
async get() {
const res = await axios
.get('https://api.imgur.com/3/gallery/hot/time/1?showViral=true&mature=false&album_previews=false',
{ headers: { 'Authorization': 'Client-ID myclientid' } })
this.images = res.data
}
and have a v-for loop to get images from response
<image v-for="image in images" :key="image.id"
:style="{height: 300, width: 300}"
:source="{uri: `https://i.imgur.com/${image.cover}.jpg` }"/>
When I slice the res.data I have no loading problems, but if I don't my app tries to load everything at the same time and get very laggy.
I tried the loading="lazy" inside the image but didn't work as vue-native image components are a bit different
Does someone have a solution ? thanks