Hi, I'm updating the react and om version in my app. One of the required changes is using CSSTransitionGroup
from react-transition-group
instead of react-with-addons
. How do I use it in om
? I have included react-transition-group
as a dependency in my project.clj
and required cljsjs.react-transition-group
in my cljs code. But when I try adding it to an om component by calling ((.-CSSTransitionGroup js/ReactTransitionGroup))
I get an error: Cannot call a class as a function
@ashercoren Perhaps something like (js/React.createElement (.-CSSTransitionGroup js/ReactTransitionGroup) #js {:transitionName "name" ...})
? The error seems quite self explanatory (CSSTransitionGroup is a class and you can't call it as a function).
@danielstockton Thank you. It works. Although I don't like the idea of explitly calling React.createElement
when in om
...
(dom/create-element (.-CSSTransitionGroup js/ReactTransitionGroup) #js {})
then?
https://github.com/omcljs/om/blob/master/src/main/om/dom.cljs#L68
dom/create-element
:thumbsup: