Reagent should-component-update not called

1.8k views Asked by At

I'm trying to implement the should-component-update lifecycle function in order to avoid some unnecessary rendering. My current implementation looks like this:

(def my-component
  (with-meta
    (fn 
      [props]
      (fn-body-here-with-some-reactive-deref'ing-going-on))

    {:should-component-update 
     (fn [this old-argv new-argv]
       false)}))

The component always updates even though I return false from should-component-update. The function doesn't even seem to be called as adding some debugging (.log js/console ...) statements doesn't produce any messages in console. What am I missing here?

0

There are 0 answers