This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-23
Channels
- # beginners (27)
- # boot (8)
- # cider (17)
- # cljs-dev (8)
- # cljsrn (5)
- # clojure (56)
- # clojure-dev (34)
- # clojure-gamedev (4)
- # clojure-italy (32)
- # clojure-nl (22)
- # clojure-poland (3)
- # clojure-russia (17)
- # clojure-spec (31)
- # clojure-uk (48)
- # clojurescript (47)
- # core-async (41)
- # cursive (13)
- # datomic (22)
- # emacs (9)
- # figwheel (7)
- # fulcro (18)
- # graphql (3)
- # hoplon (15)
- # jobs-discuss (38)
- # keechma (1)
- # luminus (10)
- # off-topic (42)
- # onyx (8)
- # overtone (3)
- # protorepl (5)
- # re-frame (42)
- # reagent (6)
- # reitit (3)
- # schema (4)
- # shadow-cljs (39)
- # slack-help (5)
- # spacemacs (8)
- # specter (1)
- # tools-deps (36)
- # uncomplicate (9)
- # vim (34)
so is there any ‘consensus’ lol on [{props-map} & children]
, [props ... & children]
How do you mean?
well I’ve seen articles that are more in favor of a stricter [my-component {:aprop "1"} ..]
in more react style convention vs lots of code/examples with tons of components whose args are just ‘normal’ clojure variations was just wondering if there’s a preponderance of opinion in terms of style one way or the other for reagent components
@eoliphant In my opinion you should just write what is most natural. The only issue that arises is when you do interop with higher ordered components—then you must have the props map. Reagent went out of its way to make the render functions look and feel like normal functions so might as well take advantage of that. I use both styles where appropriate. If the first arg is not a map then reagent just sets prop to be empty.