om

Please ask the channel first, not @dnolen directly!
2017-06-27T09:10:07.383872Z

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

2017-06-27T09:13:50.441827Z

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

2017-06-27T09:19:00.520628Z

@danielstockton Thank you. It works. Although I don't like the idea of explitly calling React.createElement when in om...

2017-06-27T09:20:24.542368Z

(dom/create-element (.-CSSTransitionGroup js/ReactTransitionGroup) #js {}) then?

2017-06-27T09:38:11.816419Z

dom/create-element :thumbsup:

👍 1