Skip to content

correct strategy to preload image before mount? #76776

Answered by icyJoseph
heecheon92 asked this question in Help
Discussion options

You must be logged in to vote

I think, you have to see this first, through the "native" DOM utilities, you have at hand. The formal way to preload, as soon as possible, is through link elements, with rel="preload", https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload#what_types_of_content_can_be_preloaded

ReactDOM's preload, does that for you, so you kind of got your framework answer there.

fetchPriority, is perhaps best modeled, when you think of several resources that are already in queue to be fetched, then you can hint at the browser that a given resource, should go ahead of the queue, everything else being equal.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by heecheon92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants