Open nickchomey opened 1 month ago
Currently uhtml/ssr
is the new way to deliver server templates but it cannot compete in raw performance with uhtml-ssr
because:
uhtml/ssr
uses uhtml/dom
which is an even lighter version of linkedom but it still lacks hydration which will come at some pointuhtml-ssr
produces only strings, hence it has little-close-to-none overhead when vomiting out HTMLucontent
needs some dependency update but I think it's still a valid/handy option that is more focused on SSR only, not necessarily to have feature parity with uhtml (because of minification and stuff that won't land directly in uhtml)Arguably, ucontent for SSR only is probably the best way to go but if you are looking for 99% interop (events and hydration are still missing) uhtml/ssr
would be my pick.
I promise I won't create any other library and all of these helped me to reach stability and maturity with uhtml itself but there's something missing for the BE story that one day I'll fix ... I don't have capacity these days though and free time to work on this is unfortunately too little.
Thanks very much for confirming that all of those are valid options (and also for making me aware of uhtml/ssr)! I'll give them a try to see which will suit my needs best.
Apologies if I should ask this elsewhere, but it seems relevant enough here:
What I'd now like to do is
I'm curious which of your libraries you would suggest for this?
Is Linkedom the most appropriate for the dom parsing, extraction and manipulation? And then one of the above options for the actual SSR rendering of the templates? And then normal uhtml in the browser, with the same js script templates?
Thanks!
I see that the uhtml-ssr and ucontent libraries are available for SSR templating, but they seem to have not received any updates in 2 and 4 years, respectively. That doesn't mean that they don't work, but I'm curious how they compare to uhtml which has been actively developed since then? Also should we be using uhtml-ssr or ucontent for SSR templating?
Moreover, are there any special considerations to take into account if we want to use one of those for SSR and use (ideally) the exact same code/templates with uhtml in the browser?
Thanks!