This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-27
Channels
- # bangalore-clj (2)
- # beginners (37)
- # boot (16)
- # cider (17)
- # clara (4)
- # cljs-dev (351)
- # cljsrn (16)
- # clojure (219)
- # clojure-belgium (4)
- # clojure-dev (3)
- # clojure-france (2)
- # clojure-italy (24)
- # clojure-russia (23)
- # clojure-spec (55)
- # clojure-switzerland (3)
- # clojure-uk (89)
- # clojurescript (121)
- # cursive (2)
- # datomic (29)
- # devops (2)
- # graphql (8)
- # hoplon (15)
- # immutant (5)
- # lein-figwheel (4)
- # liberator (3)
- # luminus (18)
- # off-topic (9)
- # om (6)
- # onyx (31)
- # pedestal (48)
- # precept (9)
- # re-frame (19)
- # reagent (63)
- # ring-swagger (69)
- # robots (1)
- # slack-help (14)
- # spacemacs (12)
- # sql (2)
- # test-check (4)
- # unrepl (28)
- # untangled (5)
- # yada (3)
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?
dom/create-element
:thumbsup: