Fork me on GitHub
#re-frame
<
2021-05-28
>
eval-on-point15:05:29

Has anyone had success using event listener breakpoints with Reagent components? Is it possible to achieve? For example, if I put an `:on-click` listener on a Reagent component, I would expect the breakpoint to take me to the line of code where that listener is defined

p-himik16:05:09

Just to be clear - you mean JS events and not re-frame events, right? I don't remember trying it but I don't think that'll happen because React introduces synthetic events, so it has to wrap your JS event handlers. Perhaps React DevTools browser extension does something to help with that, no clue.

eval-on-point17:05:46

Yup, referring to JS events. Trying to achieve something like an event listener breakpoint as described https://developer.chrome.com/docs/devtools/javascript/breakpoints/#event-listeners. Ultimately, I would like to be able to quickly navigate to the place in my code where the component I am looking at is defined. I'll do some investigation into React Devtools to see if there is a solution there