This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-22
Channels
- # adventofcode (78)
- # announcements (12)
- # babashka (2)
- # beginners (116)
- # calva (20)
- # cider (17)
- # clj-kondo (15)
- # cljs-dev (51)
- # clojure (32)
- # clojure-android (1)
- # clojure-dev (4)
- # clojure-europe (91)
- # clojure-gamedev (1)
- # clojure-italy (2)
- # clojure-nl (1)
- # clojure-spec (12)
- # clojure-taiwan (1)
- # clojure-uk (10)
- # clojurescript (9)
- # conjure (3)
- # cryogen (4)
- # cursive (4)
- # data-science (1)
- # datomic (5)
- # depstar (5)
- # fulcro (39)
- # google-cloud (2)
- # kaocha (2)
- # malli (7)
- # off-topic (3)
- # pathom (3)
- # pedestal (5)
- # re-frame (19)
- # rewrite-clj (54)
- # ring (3)
- # shadow-cljs (12)
- # spacemacs (12)
- # specter (3)
- # tools-deps (63)
@juhoteperi Congrats on the Reagent release 1.0.0! I notice for React functions you use :f>
to call them.
From a static analysis perspective, it would be nice to support an optional keyword in the first position of a normal component call as well, so e.g. clj-kondo could give you arity or type warnings.
E.g.: [:r> my-component 1 2 3]
(not sure about :r>
, maybe something nicer like [:fn my-component 1 2 3]
could also work)
:r>
is already used, it is for "raw" React components 🙂
maybe too verbose. but something to think about. if this can be detected uniquely by clj-kondo, it would solve an open issue I've been thinking about for a long time
The issue is here: https://github.com/borkdude/clj-kondo/issues/25
I guess it would be OK to have keyword for the normal Reagent component also. Not sure how safe it would be to detect these keywords. Someone else could also be using them inside Hiccup vectors.
Best would be if Reagent just had DOM functions like Helix (or Om...)
Helix uses macro to generate fns so that probably doesn't work without additional config: https://github.com/lilactown/helix/blob/master/src/helix/dom.cljc
Though Helix components are used thorugh helix.core/$ macro so at they are easy to find... Anyway, I'll open issue on Reagent to keep track of ideas on making the forms easier to analyse.