Fork me on GitHub

Hello. I gave an intro to cljs + Reagent talk to 150 React devs here in Sydney at React Sydney meetup.


They are very interested in what we're up to!


It was tough to teach them enough clojure to explain Reagent - it was good that they knew react though!


I forgot to mention that our component-should-update functions are much simpler / faster / easier / and sort of obsolete.


I’m having trouble figuring out how to get event handlers working for svg elements with reagent. I’m generating a group of circles in a for loop and attaching an on-mouse-over event to each one. I can’t seem to get this to work. The same event handler seems to work fine for other html elements so not sure what the problem is.


How are you attaching the event listeners?


[:circle {:r 25
                 :fill "red"
                 :stroke "black"
                 :cx (* 2.5 100)
                 :cy (* 2.5 100)
                 :on-mouse-over handler-fn


yeah don't see an issue w/ that


Yeah, i’m stumped. When I check the sources tab in chrome devTools and use Event Listener breakpoints I see the event listener is being triggered but in the Scope section I notice the “this” is null for my svg elements (circles). When I add an event listener to a div the “this” is the scope section correctly shows an html element


hi, is it possible to use reagent to develop clojurescript components which will fit into an existing javascript react app?


So per an earlier mentioned problem I can’t get event handlers to work with svg elements in the latest reagent. I downgraded to 0.5.1 and it works fine. Has anyone else had issues?