Fork me on GitHub
#reagent
<
2018-08-29
>
benzap17:08:24

Is there a way to conditionally append more than one element? Is there a special-form that i'm not aware of? This doesn't appear to work, but i'm able to use this in the similar library rum.

benzap17:08:42

Ah, I just noticed this. I already posted an issue https://github.com/reagent-project/reagent/issues/396

benzap17:08:59

It seems like that functionality is very similar, but it makes me wonder why they chose to make it express a React Fragment, and not just pre-process the vector before passing it to be rendered

benzap17:08:57

Dang, i'm using an older version of reagent, so I can't use this feature. I"ll have to get some tests in place, and bump the version. Thanks @U662GKS3F

benzap17:08:22

I could just wrap the pair of elements in another :div, but this breaks the styling of the page

benzap17:08:01

So I guess what i'm asking is, is there a special form to concatentate to the end of the most recent parent form vector?

gadfly36117:08:04

+1 on using into

benzap17:08:15

I guess I should propose an enhancement issue

robert.spurrier17:08:51

hey @gadfly361, thanks for baking-soda. quick n00b question. how do I properly represent an attribute like sm={2} in ClojureScript? e.g. <Label for="exampleFile" sm={2}>File</Label> turns into... [b/Label {:for "exampleFile" :sm=?} "File"]

robert.spurrier17:08:14

for context im trying to use reactstrap in re-frame to make a form. im using this as a guide to figure out what my options are : http://reactstrap.github.io/components/form/

gadfly36118:08:06

@rspurrier I think it would just be a literal number, like {:sm 2}