#how to await for several resources on For loop ?
9 messages · Page 1 of 1 (latest)
also, createResource(() => props.cover, v => fetch(v).then(r => r.blob()).then(URL.createObjectURL))
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?
But with a bit of playing, it looks like SuspenseList is what you are looking for :
https://playground.solidjs.com/anonymous/df126194-a2c0-4a26-95bd-a0daeecbe70f
Be aware that SuspenseList is still noted as experimental in the doc
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.