usePreloaderInfo #311
maiieul
started this conversation in
Proposals For Qwik
Replies: 0 comments
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
usePreloaderInfo
hook 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":
fallbackToMpa
implementation is cleaner2. Granular info - ability to provide custom loading UIs with a
activelyPreloadingBundlesCount
tied to the componentFor this we would need a way to know which QRLs correspond to which component.
Ideas:
The challenge with this would be that the custom loading UI would have to be preloaded first (maybe through ssrPreloads), delaying a little the chance of a user event bundle to have been preloaded already.
Code examples
or
Links / References
No response
Beta Was this translation helpful? Give feedback.
All reactions