Repository navigation
Resumability without $ boundaries and serialization rules: controlled granularity component level Resumability #354
Closed
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?
Splitting Qwik apps only at the component level into instantiate and render segments, so that no $() wrappers and serialization rules are needed.
What's the motivation for this proposal?
Problems you are trying to solve:
Goals you are trying to achieve:
useSerializer$, classes and Stream just work, ecosystem and agnostic tools can make Qwik versions of their tool easilyProposed Solution / Feature
What do you propose?
Splitting the code into QRL segments only at the component level into 1 instantiate and 1 render segment for each component.
This shifts the responsibility of splitting the code to the developer a little bit, but also gives them more control in keeping the logical pieces together. In the normal case they should not worry about it unless they write extremely big components. If the user experienced performance is similar, then maybe that's an acceptable or even desirable, less magical tradeoff for the developer.
Having separate segments for instantiate and render allows for not shipping render functions to the client in the case of SSR.
Code examples
Consider:
The optimizer would turn it into:
HTML output:
decoded state graph:
Example User Flow
Loaded this click: 2 instantiate chunks (~a few hundred bytes). Render chunks: still none..
Links / References
No response
All reactions