lambdaisland

rafd 2023-04-29T21:02:39.023469Z

https://github.com/lambdaisland/hiccup mentions that it is "extensible via the HiccupTag" protocol. Is this implemented? Is there an example somewhere?

rafd 2023-04-29T21:16:44.904669Z

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.

Alys Brooks 2023-05-06T02:15:14.090239Z

Hi @rafd I think it makes sense for us to maintain that compatibility. Are you still interested in doing a PR?

athomasoriginal 2023-04-29T21:34:11.529409Z

Are you trying to use this library in the frontend?

rafd 2023-04-29T21:37:47.335439Z

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.

rafd 2023-05-08T15:28:57.606829Z

Yes indeed. Will do.

rafd 2023-05-08T17:35:42.733529Z

https://github.com/lambdaisland/hiccup/pull/5 🙂

Alys Brooks 2023-05-08T18:08:19.838039Z

Thanks!