#how to await for several resources on For loop ?

9 messages · Page 1 of 1 (latest)

heady zephyr
#

how to await for several resources on For loop ?

runic nymph
#

also, createResource(() => props.cover, v => fetch(v).then(r => r.blob()).then(URL.createObjectURL))

hasty horizon
#

If suspense is not what you are looking for, does loading="lazy" in the img help ?

#

Defers loading the image until it reaches a calculated distance from the viewport, as defined by the browser. The intent is to avoid the network and storage bandwidth needed to handle the image until it's reasonably certain that it will be needed. This generally improves the performance of the content in most typical use cases.

It sounds like it may help?

hasty horizon
mossy kayak
#

I guess you could try controlling it explicitly, load each card one at a time, adding to the cards list one by one to render the next item dynamically.