Fork me on GitHub
#reagent
<
2020-09-15
>
pmooser09:09:30

When we're adding event handlers using something like the :on-click member of a map, is there any any way to provide the additional arguments that you sometimes see passed to addEventListener ? I'm specifically trying to deal with a passive vs. non-passive event listener issue I'm seeing in Chrome.

pmooser09:09:39

I can do it in component-did-mount but that is a bit ugly ...

p-himik21:09:21

It has nothing to do with Reagent, it's the React limitation. So yeah, AFAIK you will have to use :component-did-mount.

Lucy Wang05:09:21

Or using refs + useEffect hook if you're using reagent 1.0 and functional components

Lone Ranger21:09:35

dawww nothing that ugly about a form-3 component!! they need love too!