Fork me on GitHub

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.


yeah, I find myself doing a bit of both, was just wondering what is ‘best’ lol, and it is kind of nice that they can be more ‘natural’ clojure. I do tend to use the map/props style more for form components


Yes me too.