Fork me on GitHub
Mario C.16:07:13

I am using Om and I've encountered quite a peculiar case. I had a component that wraps a reify such as (defn funny-view [funnies owner] (let [...] ... (reify om/IRenderState (render-state [...]...). Inside the let I had a list [my-list-of-jokes [:j1 :j2]] and whenever I changed the state in the parent component, the list would replicate [:j1 :j2 :j1 :j2]. I added some println's as sanity checks in the let and I noticed that they would output many times but println's in the render function would output the expected number of times. The replication would only occur once after initial page load and first update then after it would not happen. I know this was occurring because of the let wrapping and after moving that logic into the init-state everything works as it should. I am just curious on the why it was happening. Any ideas?

Mario C.21:07:56

Upon further investigation it turns out it wasn't Om after all :man-facepalming: