Q65: What are Resource Preloading APIs in React (prefetchDNS, preconnect, preload, preinit)?
React provides built-in resource preloading functions inside react-dom (prefetchDNS, preconnect, preload, preinit). Calling these functions inside components allows React to hoist resource hints into the document head, optimizing stylesheet, font, and script fetch priorities early.
Key Takeaways
- Built-in resource loading utilities optimize network fetching priorities.
- Functions like
preload()andpreinit()hoist asset tags into<head>dynamically.
Knowledge Check
Which method from react-dom preloads and executes a script asset with high priority?