usePreloaderInfo #311
maiieul
started this conversation in
Proposals For Qwik
Replies: 1 comment
-
|
Discussed a while ago with the team and it seemed everyone was onboard with the gneral idea so converting into an an RFC issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is it about?
A hook that exposes real time preloader information, such as
activeUserEventPreloadsCount,activePreloadsLength, etc.What's the motivation for this proposal?
Problems you are trying to solve:
Goals you are trying to achieve:
It should be possible to do one without the other.
Proposed Solution / Feature
What do you propose?
A
usePreloaderInfohook provided by Qwik core.Potential implementations
1. General info is achievable today
POC: QwikDev/qwik#8035
screen recording: https://github.com/user-attachments/assets/e4e47802-5f07-49dd-b5c8-91ba271b3e1b
The problem is it's not tied to a component and visible tasks are also counted as "activeUserEventPreloads":
fallbackToMpaimplementation is cleaner2. Granular info - ability to provide custom loading UIs with a
activelyPreloadingBundlesCounttied to the componentFor this we would need a way to know which QRLs correspond to which component.
This should be achievable through the qwikLoader.
The challenge with this would be that the custom loading UI would have to be preloaded first (maybe inlined or through ssrPreloads).
Code examples
or
Links / References
No response
Beta Was this translation helpful? Give feedback.
All reactions