Fork me on GitHub
#reagent
<
2021-08-26
>
danbunea16:08:40

Is it possible to reproduce this using Reagent:

<ListItemText
          primary="Brunch this weekend?"
          secondary={
            <React.Fragment>
              <Typography
                component="span"
                variant="body2"
                className={classes.inline}
                color="textPrimary"
              >
                Ali Connors
              </Typography>
              {" — I'll be in your neighborhood doing errands this…"}
            </React.Fragment>
          }
        />

danbunea16:08:18

and I am interested in the part that passes a component to the secondary property

danbunea16:08:24

if it is possible

danbunea16:08:23

[:> ListItemText {:primary "Brunch" :secondary (r/as-element [:> Typography "aaa"])

❤️ 1
p-himik16:08:30

It is possible, and Reagent has examples in its repo. You need to wrap the Hiccup vector that you pass to secondary with reagent.core/as-element.

danbunea16:08:50

added the answer 👆 thanks agaian