This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-17
Channels
- # bangalore-clj (2)
- # beginners (51)
- # boot (20)
- # cider (14)
- # clara (1)
- # cljs-dev (14)
- # cljsrn (50)
- # clojure (140)
- # clojure-dev (5)
- # clojure-france (1)
- # clojure-gamedev (3)
- # clojure-italy (4)
- # clojure-poland (3)
- # clojure-russia (8)
- # clojure-sg (1)
- # clojure-spec (64)
- # clojure-uk (51)
- # clojurescript (54)
- # core-typed (1)
- # data-science (2)
- # datomic (61)
- # docker (1)
- # emacs (6)
- # events (1)
- # graphql (1)
- # hoplon (14)
- # leiningen (8)
- # luminus (3)
- # mount (6)
- # off-topic (18)
- # om (17)
- # parinfer (34)
- # pedestal (47)
- # play-clj (1)
- # protorepl (1)
- # re-frame (56)
- # reagent (11)
- # ring-swagger (5)
- # rum (6)
- # sql (1)
- # uncomplicate (2)
- # vim (3)
- # yada (31)
Hi guys... How do you import external JavaScript react components in reagent / re-frame ? Example... I want import this package in my project https://www.npmjs.com/package/@atlaskit/button ... I tried using npm-lein ... But nothing...
@renan for accessing it at all, see here: https://clojurescript.org/reference/dependencies For using it in reagent see here: http://nicolovaligi.com/boostrap-components-reagent-clojurescript.html Basically, there is a wrapper function in reagent that adapts pure react components to work in reagent
Looking at the Reagent source trying to figure out how a watcher is registered to a particular ratom. Is it in the first deref? What exactly function is registered exactly?
@jebberjeb https://github.com/reagent-project/reagent/blob/master/src/reagent/impl/component.cljs#L141 https://github.com/reagent-project/reagent/blob/master/src/reagent/ratom.cljs#L501
React render fn captures Ratom deref
calls
run-in-reaction -> deref-capture -> in-context -> sets \ratom-context\
Reaction IDeref -> notify-deref-watcher! checks ratom-context: https://github.com/reagent-project/reagent/blob/master/src/reagent/ratom.cljs#L51