I'm trying to update some code to use the newest version of c2.
I've converted all of my
(unify! "div.my-selector" my-atom f)
with
(bind! "div.my-selector"
[:div.my-selector
(unify @my-atom f)])
Everything works well. It even somehow updates the dom when I swap! out my atom.
My problem is that I can't figure out how to replace the functionality of unify!'s :post-fn. My visualization has many points, and I used unify!'s :post-fn to create a kd-tree of all the points. This allows me to do efficient nearest-neighbor lookups when I want to show a tooltip.
Is there some event that is fired after the dom is updated? Are there any plans to add the post-fn functionality to singult's unify?