This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-08
Channels
- # adventofcode (240)
- # beginners (87)
- # boot (4)
- # cider (27)
- # cljs-dev (20)
- # cljsrn (24)
- # clojure (365)
- # clojure-argentina (1)
- # clojure-brasil (4)
- # clojure-dev (12)
- # clojure-greece (65)
- # clojure-india (1)
- # clojure-italy (15)
- # clojure-japan (1)
- # clojure-losangeles (1)
- # clojure-madison (4)
- # clojure-poland (3)
- # clojure-russia (5)
- # clojure-spec (3)
- # clojure-uk (105)
- # clojurescript (27)
- # core-async (1)
- # core-logic (3)
- # cursive (61)
- # datomic (68)
- # devcards (4)
- # docs (27)
- # duct (67)
- # emacs (15)
- # events (1)
- # fulcro (8)
- # graphql (50)
- # lein-figwheel (1)
- # lumo (15)
- # numerical-computing (1)
- # off-topic (77)
- # om (3)
- # onyx (5)
- # parinfer (3)
- # planck (2)
- # portkey (5)
- # re-frame (4)
- # reagent (16)
- # ring (14)
- # rum (3)
- # shadow-cljs (17)
- # vim (1)
I've heard good things about https://www.netlify.com/ (but haven't tried it myself) @aaelony
I'm trying to find some documentation but I'm having trouble defining exactly what I mean. Is it possible with Reagent to return a list of components such as (defn some-comp [] [[:span 1] [:span 2] [:span 3]])
*edited?
@joshkh this came up recently with https://groups.google.com/forum/#!topic/reagent-project/XThd9FKJrWo
You can use some newer React features with Reagent, or you can avoid the pattern until later
Thanks, that's exactly what I was looking for. I have a component that returns one or more table rows. I was mapcatting the results but wasn't sure if that was the "right" thing to do.
The “newish” React “fragments” addresses the issue. And it looks like if you follow links given in that post I shared, you can see the Reagent approach to hooking into it. It’d depend on the versions you are using etc.
As far as what I’ve done so far, I’ve still just done it the “old school” way and avoiding the problem
If I need a helper fn to return a “list of components” I just call it as a fn from within another component
The easy part to get confused I think is that the helper that returns a “list of components” doesn’t represent a valid “render fn” itself, so you’d call it with paren “(” instead of square bracket “[” and it wouldn’t have any fancy “don’t call when no arg changed” logic due to that.
Hi @pesterhazy, thanks!