Fork me on GitHub
#reagent
<
2020-12-13
>
GGfpc16:12:15

Hello! I'm trying to use this react component https://medium.com/@isabellepino/package-for-react-carousel-31aac8b1f090 I've managed to import it via shadow-cljs, but when I actually use it. I get an error saying ypeError: Cannot call a class as a function I'm calling it just as I've called other components.

[Carousel
    [:div
     [:img {:src ""}]]]

p-himik16:12:26

Replace [Carousel with [:> Carousel and wrap [:div ...] with reagent.core/as-element.

p-himik16:12:41

(maybe the latter is not needed - you should check)

valtteri17:12:05

Has someone figured out how to make Material-UI TextAreaAutosize work with Reagent caret fix? Example project says FIXME what comes to that. https://github.com/reagent-project/reagent/blob/master/examples/material-ui/src/example/core.cljs#L46-L48 I thought I’d ask here before start digging into it myself..

tobias01:12:03

I use uncontrolled input to get around this (ie set default-value instead of value in the component properties) , and then update the react key if I want to force rerender

valtteri14:12:47

Cool, thanks!