Fork me on GitHub
#reagent
<
2019-09-14
>
lepistane13:09:17

what's the best way to deal with addEventListeners ? working with https://developers.google.com/maps/documentation/javascript/infowindows i wanted to deal with hiccup only so i used render-to-string for component and it worked the only problem is there are no on-click events when render-to-string is used, and i am not sure how to add them afterwards (js/setTimeout (fn [args] (.addEventListener (.getElementById js/document "take") "click" (fn [args] (println "TAKE")))) 1000) This works but if feels soooo dirty does anyone have any suggestions ?

lepistane13:09:27

basically i would like to add event after the component is mounted