Fork me on GitHub
#reagent
<
2017-02-12
>
jmgpeeters09:02:28

I've been trying to get a CSSTransitionGroup thing to work (based on https://github.com/reagent-project/reagent-cookbook/tree/master/recipes/ReactCSSTransitionGroup but on top of the lein reagent template). I'm getting a "Uncaught TypeError: Cannot read property 'CSSTransitionGroup' of undefined" error at "(reagent/adapt-react-class (aget js/React "addons" "CSSTransitionGroup")))". Anyone an idea?

jmgpeeters09:02:54

I have this in my dependencies already:

jmgpeeters09:02:55

[reagent "0.6.0" :exclusions [cljsjs/react]] [reagent-utils "0.2.0"]

jmgpeeters09:02:10

[cljsjs/react-with-addons "15.4.2-2"] [reagent "0.6.0" :exclusions [cljsjs/react]]

jmgpeeters09:02:48

(I'm quite a beginner, so may easily have overlooked something stupid)

pesterhazy09:02:12

Try checking in chrome's devtools if the property is there

pesterhazy09:02:07

If it is there it may be a problem of execution order

pesterhazy09:02:29

If not it may be a dependency problem

juhoteperi09:02:51

Also, check your deps tree to see if some library (other than Reagent) has transitive dependency on react

mikethompson09:02:30

@jmgpeeters we use use react-flip-move instead of ReactCSSTransitionGroup See it used here: http://www.upgradingdave.com/blog/posts/2016-12-17-permutation.html There's a working github behind this

jmgpeeters10:02:36

might have been outdated target from previous attempts, after a "lein clean" it complains about missing js/ReactDom instead.. an error I used to have before as well. I've been trying to follow the advice in https://github.com/reagent-project/reagent/issues/275 (especially wrt to the cljsjs/react.cljs file with (ns cljsjs.react) in it), but it doesn't seem to help (nor am I quite sure where exactly to put that file).

jmgpeeters10:02:05

(thanks, mike, will also have a look at that. right now I'm enjoying the current rabbit hole, as it allows me to learn some of the underlyings ...)

jmgpeeters11:02:09

didn't manage to get it to work .. I'll try again some other time. 😕

pesterhazy12:02:45

I know it worked for me in a similar situation 🙂

jmgpeeters13:02:21

I haven't got an explicit html file, though - through the reagent template I guess it constructs that from the hiccup on the server side? so how would your hack translate there? 🙂

pesterhazy13:02:28

what's reagent template?

pesterhazy13:02:37

can you give me a link?

pesterhazy14:02:21

ah yes, you would need to add [:script "..."] there first thing in the head element

jmgpeeters15:02:08

sorry, yes, that's what I was referring to. whatever you get when you do "lein new reagent .."

jmgpeeters15:02:12

let's try that, so. 🙂