https://github.com/lambdaisland/hiccup mentions that it is "extensible via the HiccupTag" protocol. Is this implemented? Is there an example somewhere?
Also, there is still a mismatch in behaviour between Reagent+React and https://github.com/lambdaisland/hiccup with-regards-to camelCasing attribute keys. Reagent+React converts all kebab-case attributes to camelCase, except those that are data-* and certain SVG attributes (https://github.com/preactjs/preact-compat/issues/222) . For example. [:text {:font-family "Arial" :data-x "1" :on-click "fn()" :foo-bar ""}] results in "font-family", "data-x", "onClick", "fooBar" in Reagent+React but all kebab-case in lambdaisland/hiccup . If maintaining this compatibility is in scope, I could make a PR.
Hi @rafd I think it makes sense for us to maintain that compatibility. Are you still interested in doing a PR?
Are you trying to use this library in the frontend?
No. I use Reagent in the frontend, but, occasionally like to use the same components on the backend. I have an internal lib that does similar things to lambda-island/hiccup and was evaluating to switch over. My understanding is that the purpose of lambda-island/hiccup is to allow for a component function defined in a cljc file to be usable both on frontend (with Reagent) and backend (with hiccup), with same resulting code.
Yes indeed. Will do.
Thanks!