Fork me on GitHub
#reagent
<
2015-07-20
>
jackrusher09:07:21

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.

jackrusher13:07:12

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

mikethompson13:07:58

Notice Matt's version ... [cljsjs/react-with-addons "0.12.2-3"]

mikethompson13:07:21

i wonder if it is that simple?

jackrusher14:07:40

@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

jackrusher15:07:32

@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

jackrusher15:07:48

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.

jackrusher16:07:58

^ in case anyone else happens along with the same problem, the above was the solution.

ul18:07:02

guys, where do you put form logic usually if you don't want some fields to dispatch special event? i mean if i have special checks to perform about other fields if specified fields was changed, but i want this specified field to dispatch the same event as others

ul18:07:06

in middleware?

roberto18:07:11

@ul try re-frame. It handles situations like this elegantly

ul18:07:45

oh, sorry, hard day. i was sure i was asking in #C073DKH9P channel