Fork me on GitHub

How can I get the current component in an event-handler(for example on-click function)?


I want to use reagent/force-update to update component immediately. Currently I'm using

(defonce forcer (atom 0))

(defn update-editor-state [new-editor-state]
  (re-frame/dispatch-sync [:content-edit/editor-state new-editor-state])
  (swap! forcer inc))
Wonder if there will be a better solution?


Hi all. I use @reagent/track extensively to prevent undue renderings of components linked to my (deep) app db. Yet, a problem persists whereby stuff gets unnecessarily rendered and I wonder: is there a way to know what triggered a component render other than throwing sticks at my code by commenting sections in and out?