Are there any recent examples of Web Components implemented in cljs without a library or a lot of ceremony?
there is also a defclass macro in shadow-cljs, with an example for a web component here: https://clojureverse.org/t/modern-js-with-cljs-class-and-template-literals/7450
no library required a macro is sufficient to make it work
(to clean up the boilerplate)
http://gist.github.com/thheller/36332574918b974a3e4996efcb7457d2#file-web-component-v1-cljs-L26 I adapted this Thomas Heller gist
Oh wow... not as bad as I thought.
I made a simple macro - https://github.com/swannodette/conj-2025-talk/blob/main/src/conj_2025/core.clj
Ah, yes. That was a great presentation.
But it's all sugar, the web supports class-less Web Components already
I hadn't seen one implemented w/o classes before. Good to know
And I assume the fact that GCL is archived should be a non-issue?
Google archived, we maintain an active fork
the first thing we did was fix 6 years of meaningless breakage
nice
most of what's there I would argue is pretty future proof until the day you don't need to use it anymore.
i.e. Temporal, CSS Positioning - but those years before you will be able to use them - Safari is not evergreen
question about that, is there a separate source tree for that fork? Or some process that operates on their archived one?
hard fork -https://github.com/clojure/closure-library
amazing, thank you. I will look there. 🙇
we're welcome to do as we please. Most of the namespaces haven't changed in a significant way in years - so super stable. But may we want to do new things, or mark deprecations as the web provides the functionality.
the goog.ui stuff could be used to drive CLJS web components - we do that at work
some of the bits need updating, but I'm hoping that we can collectively do that so that reusable components are available regardless of other choices
React, morphing, HTMX, doesn't matter
I'm weary of the eternal js build chain dance, and the react payload size, but it's a major change in mindset. Have to be sure we can replicate the functionality we've built. I need to try a small POC for work.
definitely - I think GCL can help w/ not starting completely from scratch. But it's an investment for sure.