This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-02
Channels
- # adventofcode (63)
- # announcements (21)
- # babashka-sci-dev (1)
- # beginners (24)
- # biff (2)
- # calva (78)
- # cherry (6)
- # clj-commons (3)
- # clj-kondo (7)
- # clojure (91)
- # clojure-austin (2)
- # clojure-bay-area (6)
- # clojure-denmark (1)
- # clojure-europe (45)
- # clojure-nl (1)
- # clojure-norway (16)
- # clojure-portugal (3)
- # clojure-uk (1)
- # clojurescript (20)
- # conjure (11)
- # datalevin (13)
- # datomic (5)
- # emacs (14)
- # etaoin (15)
- # events (7)
- # fulcro (9)
- # funcool (1)
- # honeysql (26)
- # joyride (4)
- # kaocha (3)
- # lambdaisland (2)
- # malli (7)
- # off-topic (22)
- # pathom (29)
- # portal (58)
- # practicalli (8)
- # rdf (25)
- # reagent (14)
- # sci (3)
- # scittle (37)
- # shadow-cljs (10)
- # slack-help (2)
- # spacemacs (7)
- # sql (7)
- # tools-deps (1)
- # xtdb (2)
Just released a reagent component for interactive equation editing, thought it might be interesting here! https://clojurians.slack.com/archives/C06MAR553/p1670012763440319
hey all - is there some way to pass a vector as a child to a React component? I am getting Uncaught Error: Assert failed: Invalid Hiccup form: [-1 1]
@UP82LQR9N haha, can you be more specific?
I am passing a pair of coordinates to a Point
component
;; this works fine:
(defn Point [opts coords]
...)
[Point {:name "A" :size 4}
[-1 1]]
strings won’t work, these are floating point coordinates of a point
(def Point
(re/adapt-react-class
(react/forwardRef
(fn [props ref]
...))))
[Point {:name "A" :size 4}
[-1 1]]
this fails before the inner function is ever called with that error
I have an idea…
I think if I really need to do this i can make an outer component that takes the vector and stuffs it into props
under some key like :coords
, then returns [InnerPoint {:coords …}]