This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-17
Channels
- # aws (2)
- # beginners (34)
- # boot (39)
- # cider (28)
- # cljs-dev (2)
- # cljsrn (30)
- # clojure (195)
- # clojure-austin (6)
- # clojure-dev (6)
- # clojure-dusseldorf (1)
- # clojure-france (1)
- # clojure-russia (139)
- # clojure-spec (25)
- # clojure-uk (66)
- # clojurescript (125)
- # community-development (1)
- # core-async (42)
- # cryogen (1)
- # cursive (22)
- # datascript (6)
- # datomic (67)
- # docker (1)
- # emacs (7)
- # events (1)
- # garden (3)
- # hoplon (15)
- # jobs (3)
- # lein-figwheel (10)
- # leiningen (3)
- # luminus (4)
- # mount (2)
- # nginx (1)
- # off-topic (101)
- # om (42)
- # om-next (6)
- # onyx (7)
- # proton (1)
- # protorepl (4)
- # re-frame (15)
- # reagent (30)
- # remote-jobs (1)
- # ring (8)
- # ring-swagger (17)
- # rum (1)
- # spacemacs (2)
- # sql (1)
- # yada (50)
@mccraigmccraig Will defenitely have a look at it during the day!
I’m abstracting away react components with functions and the react components work, but the functions don’t get called. Any ideas why: http://stackoverflow.com/questions/41685450/reagent-function-not-being-called-why
@timothypratley thanks! I'd be curious how you deal with stateful comps
@pupeno here's a sort of checklist of things to try: https://presumably.de/reagent-mysteries-part-2-reloading.html
@pesterhazy nothing there rings a bell for this issue, but maybe I’m missing something.
@pupeno I don't see anything wrong with your snippet
maybe something in the outside code? todo with your reloading setup in general?
or, perhaps, with your testing methodology? 🙂
hm oh wait
maybe it's about the way ReactToolbox handles its children
remember the difference between React components and Reagent Components
well, if Tabs
does something funky to its children, it may not work with a reagent component
I'm not reloading nor testing. Im doing fresh loads.
e.g. if Tab needs to be a direct child of Tabs
(which in your case it probably isn't, because there's an intermediary Reagent wrapper)
you could try playing with reactify-component
So, should the function tabs somehow manually render its contents?
personally I'd look into how Tabs is implemented
React components can iterate over the children, so maybe Tabs does that
OK. I'll try that when I get back home. Thank you
you're welcome
would love to see more React libraries packaged for cljsjs btw, so I'm happy you're working on this
I've already had great success with react-virtualized and react-select (both wonderful libs)
if you do end up packaging it, it'd be great to add a reagent usage example in the README.md?
I'd like to build a DOM structure similar to [:p [:div ...] [:div ...] [:div ...]]
, where divs are created out of a list. I came up with this monstruosity: "`[:p ~@(map #(vector :div ...) my-list)]". Is there a better way?
do you mean like this?
(def my-list “one” “two” “three”)
(into [:p]
(for [i my-list]
[:div i]))
@dottedmag check this article https://presumably.de/reagent-mysteries-part-1-vectors-and-sequences.html
with into there's no splicing