Closed glennsl closed 2 years ago
I just realized that React.null
exists, and should probably be copied to the DSL. null
seems like a pretty bad name though, unless you want to optimize for familiarity with JavaScript's null
. So not sure if it should be 'none' or 'null' in the DSL.
The addition of
maybe
for elements is a slightly breaking change, as it shadowsmaybe
forProp
. It's a very low effort fix though.Another ergonomic addition I've considered is making the attributes optional with an
~a
labeled argument, as in tyxml, and the addition of short-hand labeled arguments forid
andclassName
attributes, as I've noticed that I very rarely use any attributes other thanclassName
, which is used quite often. But I'm thinking it might be better to keep the DSL simple and add a ppx layer for even better ergonomics instead without any runtime cost.