v5 is coming, here what's changing #141
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
question
Further information is requested
The next version of uhtml goal is to simplify even more the DX around it:
htmlFor
andsvgFor
are gone ... thekey
special attribute will work just like in React:node
export is no-more needed ... if you render, it returns a Hole, if you don't render, it returns a node or fragment out of the box, making code even more portable across different situationsdata
,aria
and shortcuts such as?
,@
,.
but no other special attributes are provided .. bring your ownref
or your own whatever, all attributes are handled like regular attributes with no magic attached unless you decide to have magictag
special export (examples to be written)htmlFor
) but those explicit things are a headache to remember or deal with ... so I chose DX over split-hair-like performance gainsmoveBefore
proposal implemented by browsers and there I need a parentNode to work with ... so it's going to be epic anyway, but right now the differ is internal (still based on exact same udomdiff logic)preview
In terms of declarative-aproach, the
key
is a wonder but it's also rarely needed ... if you need akey
use it, if you ar enot sure, don't use it.Last, but not least, v5 provides a better core to eventually finalize hydration, as v4 has never been a good core to do so. I won't promise hydration or a proper SSR story out of the box but it will, eventually, land in here.
This is probably my last iteration over this library as I think I can't make it more readable, maintainable, still performant, or better, in terms of DX, than current v5 is, still topics like Signals, hydration, ref cna be addressed by its consumers, pushing it further than it's ever been, or I could think about.
Dare playing around with it? In such case
https://esm.run/@webreflection/x
is your import for the time being, until everything cleaned up further lands in here.The text was updated successfully, but these errors were encountered: