support multi-element string jsx #247
wmertens
started this conversation in
Proposals For Qwik
Replies: 1 comment
-
|
So basically this is "partial template support" and it's easiest on the server, but on the client if you have a static structure of 3-4 elements deep then it's faster to set |
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.
-
What is it about?
optimizing jsx for string tags
What's the motivation for this proposal?
Problems you are trying to solve:
When you write
<div class="..."><h1><div>...</div></h1></div>that will create 3 jsx objects. However they will just be transformed into strings again.Goals you are trying to achieve:
optimize this
Any other context or information you want to share:
Apparently Solid does this
Proposed Solution / Feature
What do you propose?
but only on the server. On the client we need to know the individual nodes.
Another caveat is that the outer element on a render result must be a jsxnode so handlers can be attached to it.
This saves several allocations for every such component during SSR.
Links / References
No response
Beta Was this translation helpful? Give feedback.
All reactions