Fork me on GitHub
#reagent
<
2016-07-05
>
escherize03:07:26

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

escherize03:07:33

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

escherize03:07:01

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

escherize03:07:46

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

dfcarpenter18:07:38

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.

jjfine18:07:39

How are you attaching the event listeners?

dfcarpenter18:07:45

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

jjfine18:07:15

yeah don't see an issue w/ that

dfcarpenter19:07:58

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

johanatan21:07:17

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

dfcarpenter21:07:48

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?