reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
GGfpc 2020-12-13T16:34:15.362200Z

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 "<https://images.gr-assets.com/authors/1538163619p5/197852.jpg>"}]]]

p-himik 2020-12-13T16:38:26.362400Z

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

p-himik 2020-12-13T16:38:41.362600Z

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

valtteri 2020-12-13T17:05:05.365Z

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..

tobias 2020-12-18T01:20:03.400700Z

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

valtteri 2020-12-18T14:58:47.403800Z

Cool, thanks!