This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-15
Channels
- # adventofcode (80)
- # beginners (94)
- # biff (19)
- # cider (74)
- # clj-kondo (11)
- # cljs-dev (7)
- # clojure (110)
- # clojure-austin (3)
- # clojure-australia (1)
- # clojure-belgium (1)
- # clojure-china (1)
- # clojure-europe (83)
- # clojure-filipino (1)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-norway (4)
- # clojure-sg (1)
- # clojure-taiwan (1)
- # clojure-uk (2)
- # cursive (3)
- # data-science (8)
- # datalevin (8)
- # emacs (18)
- # etaoin (5)
- # graalvm (1)
- # holy-lambda (3)
- # honeysql (1)
- # jackdaw (9)
- # java (10)
- # jobs (3)
- # luminus (9)
- # malli (106)
- # off-topic (88)
- # polylith (8)
- # portal (2)
- # re-frame (50)
- # reagent (11)
- # reitit (74)
- # remote-jobs (1)
- # shadow-cljs (46)
- # tools-deps (26)
- # xtdb (49)
Hi everyone \o How can I do this in Reagent? I've tried the adapt-react-class
functions and the [:> MyComponent ...]
in parameters... but both has failed...
Okay, I've just figured out. The create-element
did the trick \o
hey all - is there a predicate to check if an atom is a ratom?
?
beyond checking the type with instance?
one more Q… if I am reading a reagent state inside of an animation loop, where i DON’T want a re-render triggered in the component holding the loop, is this the preferred way to do a “sneaky read” of a ratom? https://clojurians.slack.com/archives/C0620C0C8/p1669207172826729?thread_ts=1669206982.672919&cid=C0620C0C8
deref returns that (after submitting the side effects to watchers) https://github.com/reagent-project/reagent/blob/e67d4f8804c109868469d6e81ecd7184cf707575/src/reagent/ratom.cljs#L137
nice!!! looks like if I do that it will work on cljs atoms as well. Thanks @U051V5LLP
and I see the answer to my other question too: (satisfies? IReactiveAtom src)
(also not sure what the performance cost is to running that binding call in a hot loop, maybe not much? reading the atom at all is obviously a cost, probably not much delta over that)