This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-21
Channels
- # announcements (13)
- # babashka (63)
- # babashka-sci-dev (64)
- # beginners (37)
- # biff (1)
- # calva (10)
- # cider (7)
- # clj-kondo (15)
- # cljsrn (6)
- # clojure (26)
- # clojure-dev (10)
- # clojure-europe (34)
- # clojure-france (9)
- # clojure-nl (2)
- # clojure-norway (36)
- # clojure-uk (5)
- # clojurescript (142)
- # community-development (1)
- # conjure (3)
- # datalevin (5)
- # datalog (2)
- # datomic (5)
- # events (11)
- # fulcro (40)
- # gratitude (9)
- # guix (32)
- # honeysql (10)
- # jobs (2)
- # lsp (32)
- # malli (15)
- # meander (5)
- # membrane (43)
- # missionary (3)
- # nextjournal (9)
- # off-topic (38)
- # pathom (3)
- # polylith (30)
- # portal (78)
- # programming-beginners (4)
- # quil (6)
- # re-frame (20)
- # reagent (21)
- # remote-jobs (2)
- # shadow-cljs (7)
- # tools-deps (6)
- # xtdb (23)
Say I'm using reagent features like track, cursors to have reactivity (so that functions are re-run when value changes) I'm running into cases where sometimes I want reactivity and sometimes I don't Is there a way I can make the function using track and cursors to be non-reactive? (i.e. evaluated only once when I call it and not evaluated when the value changes)
Also, if there a way to do that but for functions which call functions which in turn have cursors and the like? (i.e. nested case of the question above)
the readme says that reagent uses “hiccup-like” markup, but isn’t actually depending on hiccup or a cljs port of it, is it?
Hello, how do I render a react element like this with reagent?
In case you need React interop, this may help: https://github.com/reagent-project/reagent/blob/master/doc/InteropWithReact.md
Thanks, I tried create-element
, but I get this error. The component renders when I put it in JSX so there must something else I am missing.
My issue was that I was incorrectly accessing the source component from a JS object.
Would anyone know how to write the equivalent in Reagent? I’d like to have a prop to render a component as whatever HTML element I’d like
@UGT1B8S3T are you trying to do same thing?
but also have a default if no keyword is passed
in the function right?
My issue was with the way I was accessing the source react component.
I wish I knew where to start 😅 Not sure if cljs allows anything similar to as
prop
still a beginner
@U023KKYKZNE this should work
(defn heading [children & {:keys [as]
:or {as :h2}}]
(js/console.log children as)
[as children])
(defn main []
[:div
[heading "Hello world in h2"]
[heading "Hello world in small" :as :small]])
nice!!!! pretty neat. thanks so much