This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-20
Channels
- # admin-announcements (15)
- # announcements (1)
- # beginners (10)
- # boot (39)
- # bristol-clojurians (2)
- # clojure (146)
- # clojure-canada (1)
- # clojure-gamedev (8)
- # clojure-italy (2)
- # clojure-japan (16)
- # clojure-korea (1)
- # clojure-poland (1)
- # clojure-russia (20)
- # clojure-spain (3)
- # clojurebridge (5)
- # clojurescript (104)
- # core-typed (2)
- # datomic (80)
- # indycljs (1)
- # jobs (1)
- # ldnclj (31)
- # off-topic (15)
- # om (21)
- # onyx (7)
- # ox (9)
- # re-frame (2)
- # reagent (16)
Hi! I've recently been playing with reagent
and react-with-addons
:
[reagent "0.5.0" :exclusions [cljsjs/react]]
[cljsjs/react-with-addons "0.13.3-0"]
... trying to get CSSTransitionGroup
to work. When I do what seems to be the normal thing:
(def ctg (aget js/React "addons" "CSSTransitionGroup"))
[ctg (clj->js {:transitionName "example" :transitionAppear true})
[:blah]]
... I get first a react
warning: Something is calling a React component directly. Use a factory or JSX instead. See:
and then an error in util.cljs
: Uncaught TypeError: Cannot read property '__reactAutoBindMap' of null
. Has anyone else seen this/does anyone have any insights?
Thanks in advance.@jackrusher: see the third item: https://github.com/Day8/re-frame/wiki/More-advanced-Reagent-techniques
@mikethompson: Hey, thanks, but what Matt Greer discusses in that link http://www.mattgreer.org/articles/a-game-made-with-reagent/ is exactly what I pasted above that causes the error above when using the latest versions of Reagent and React-with-addons.
Notice Matt's version ... [cljsjs/react-with-addons "0.12.2-3"]
i wonder if it is that simple?
@mikethompson: Thanks, but that's why my question was about getting it to work using a particular version. Looks like it's borked in #C06DT2YSY too: https://gist.github.com/flyingmachine/800eff6e45194e655b59
@mikethompson: it looks like he got this version to work with Om: https://gist.github.com/flyingmachine/399995a4a6057e14b4e1 but applying the same approach to Reagent bumps me up against this bug (with which you are already obviously quite familiar) https://github.com/reagent-project/reagent/issues/88
It seems that the suggested answer for reagent is the addition of adapt-react-class
, as per that bug thread, which I will attempt now.
^ in case anyone else happens along with the same problem, the above was the solution.
Here is an example of adapt-react-class with csstransitiongroup: https://github.com/reagent-project/reagent-cookbook/blob/master/recipes/ReactCSSTransitionGroup/README.md