Fork me on GitHub
#reagent
<
2022-03-05
>
Valentín23:03:29

Hi, does anybody know how to convert this material-ui react code to reagent?

Valentín23:03:58

That what I have, but I think I'm not passing correctly the component property

Valentín23:03:43

I'm getting that error:

Valentín23:03:08

I'm importing the component correclty, if I log it I don't get undefined

p-himik23:03:10

Please provide all relevant CLJS code in a proper code block.

Valentín00:03:40

[:> mui/TableContainer {:component Paper}
           [:> mui/Table {:sx {:minWidth 650} :size :small :aria-label "view-recipe-ingredients"}
            [:> mui/TableHeader
             [:> mui/TableRow
              [:> mui/TableCell "Ingredients"]
              [:> mui/TableCell "Quantity"]]]
            [:> mui/TableBody
             [:> mui/TableRow
              [:> mui/TableCell "Ingredients"]
              [:> mui/TableCell "Quantity"]]]]]

p-himik00:03:14

That's not all relevant code. In any case - what happens when you replace Paper above with (do (js/console.log Paper) Paper)? If it logs undefined, then you're either importing Paper incorrectly and are mistaken about it being logged before, or you're overriding Paper with undefined at some point. Alternatively, your mui/TableContainer might potentially have different API from the TableComponent in JS - maybe you're using a different version of the library. But either way, impossible to say for sure without full code.

Valentín00:03:34

It was a spelling error.... I typed TableHeader insted of TableHead

Valentín00:03:52

thanks for your time

👍 1