This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-29
Channels
- # asami (1)
- # babashka (20)
- # beginners (3)
- # biff (1)
- # calva (5)
- # clj-kondo (68)
- # clojure (6)
- # clojure-europe (70)
- # clojure-losangeles (4)
- # clojurescript (1)
- # cursive (6)
- # exercism (1)
- # fulcro (3)
- # hyperfiddle (23)
- # introduce-yourself (1)
- # kaocha (1)
- # lambdaisland (8)
- # lsp (6)
- # off-topic (24)
- # pathom (24)
- # specter (1)
- # tools-deps (4)
- # xtdb (4)
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.
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.
Hi @U0CLNM0N6 I think it makes sense for us to maintain that compatibility. Are you still interested in doing a PR?
Thanks!