@juhoteperi After reading the updated intro with examples with defc I had this idea for clj-kondo:
https://github.com/clj-kondo/clj-kondo/issues/25#issuecomment-3368066114
Btw, is it recommended now to use defc for everything?
@borkdude Hm, I'd say only recommended for new code using hooks. Or maybe I'll recommend it for all new code, but very likely existing projects mostly keep using defn.
@juhoteperi then way is the demo using defc all over the place?
Yeah for most projects there will be both
👍 then you might as well just do it always I guess? any trade-offs?
will you be able to use dynamic hiccup in defc? I looked at the macro and it looked like it did some pre-compilation stuff maybe?
the hiccup to React elements will happen runtime, like previously
it just wraps the defc body in a wrapper fn to handle ratom watchers
which is for defns also done on runtime
Can kondo do kind of "multi-pass" checks? Keep a registry of symbols defined with defc and then check hiccup-like uses against that?
I'll keep thinking about it. You can't do it in user space currently