Fork me on GitHub

@mikethompson: thanks! still working on improving my knowledge of the library and css3. As I am using re-com, hopefully contribute some of what I have learnt back into that library.


@rohit I keeping wishing we had more in the way of animations / transitions, so I'm keen to see where you get to with this.


In a previous life, we used Flex (Flash) and oh wow did we have a lot to play with there. I love the React way, but I do miss access to all the cool kids animation toys simple_smile


i can see that. i think many people are now trying to address this issue. Twitter also release their library for addressing this issue in react:


I am currently reviewing react-motion, but i’ll get to velocity-react as well


From the blogpost: That being said, React and animation don’t actually play well together at first. There’s an impedance mis-match: React’s power stems from abstracting away the state transitions in your UIs (it does them quickly and correctly, enabling the declarative paradigm we’ve come to love), while animations live entirely within those state transitions


I'll certainly be following progress with interest


Hey guys. I have a question regarding testing the :on-click action. For example:

(deftest click-test
  (when browser?
    (let [component (fn [] [:div {:class "someclass"
                            :on-click #(println "something")}])]
      (with-mounted-component (component)
        (fn [c div]
          (let [d (.querySelector div ".someclass")]
            ;; :on-click println never fires
            (.trigger (js/jQuery d) "click")))))))
I borrowed the with-mounted-component part from Reagent tests:;v=3 In the example, :on-click never fires (testing with phantomjs). How can I test this kind of thing?


To make things more interesting, this actually works:

(deftest click-checkbox-test
  (when browser?
    (let [component (fn [] [:input {:type :checkbox 
                                    :class "someclass"
                                    :on-click #(println "something")}])]
      (with-mounted-component (component)
        (fn [c div]
          (let [d (.querySelector div "input")]
            ;; :on-click is fired
            (.trigger (js/jQuery d) "click")))))))