This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-15
Channels
- # architecture (2)
- # beginners (16)
- # boot (2)
- # cider (4)
- # clara (6)
- # cljs-dev (78)
- # cljsrn (3)
- # clojure (158)
- # clojure-austin (1)
- # clojure-belgium (1)
- # clojure-dusseldorf (19)
- # clojure-italy (8)
- # clojure-russia (3)
- # clojure-spec (77)
- # clojure-uk (61)
- # clojurescript (341)
- # cursive (9)
- # data-science (12)
- # datomic (18)
- # emacs (9)
- # fulcro (109)
- # hoplon (10)
- # juxt (2)
- # leiningen (2)
- # lumo (31)
- # off-topic (1)
- # om (4)
- # onyx (40)
- # parinfer (17)
- # re-frame (36)
- # reagent (19)
- # spacemacs (10)
- # vim (60)
- # yada (20)
Hi all, I followed [this](http://blob.tomerweller.com/reagent-import-react-components-from-npm) tutorial but cannot find any info about the 😆 macro. Is this a reagent one?
@profgra It is not a macro, it just a normal keyword and Reagent implementation uses that to adapt React class to Reagent, same as adapt-react-class
:
@profgra Nothing specific to Reagent or :>
here, you just can't use #([])
to build a vector using anon function literal
The problem is that #( )
will call what ever you have inside it, so it will try to call the vector as function
you could use #(vector :> (bs 'MenuItem) ...)
instead
@juhoteperi OK I understand. Or I could use #(identity […])
. Thank you very much.
or (fn [] […])
which does the same thing but is more concise
Any idea what might be causing that? Or should I look for fault in the other component?
@mrchance when you render you are reset!
-ing layout
. Which will cause a further render, which will reset!
layout, etc. That would be my guess if you are seeing an infinite number of calls.
So I'd look at your compute-layout
function ... my guess is that each time it is being called it is calling the #(reset layout %)
function given to it as a 2nd argument.
@mikethompson That sounds reasonable, but why doesn't it always happen? It's fine if I mount the component by itself